Commit 2820592e authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

Changed LocateDebugInfoFile to reduce stack consumption (from 13k to 2k !!)

parent b1518654
......@@ -38,8 +38,8 @@
*/
static void LocateDebugInfoFile(char *filename, char *dbg_filename)
{
char str1[MAX_PATHNAME_LEN*10];
char str2[MAX_PATHNAME_LEN];
char *str1 = xmalloc(MAX_PATHNAME_LEN*10);
char *str2 = xmalloc(MAX_PATHNAME_LEN);
char *file;
char *name_part;
DOS_FULL_NAME fullname;
......@@ -57,7 +57,10 @@ static void LocateDebugInfoFile(char *filename, char *dbg_filename)
goto ok;
else
{
quit: memcpy(dbg_filename, filename, MAX_PATHNAME_LEN);
quit:
memcpy(dbg_filename, filename, MAX_PATHNAME_LEN);
free(str1);
free(str2);
return;
}
ok:
......@@ -65,6 +68,8 @@ ok:
memcpy(dbg_filename, fullname.long_name, MAX_PATHNAME_LEN);
else
goto quit;
free(str1);
free(str2);
return;
}
/*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment