mirror of
https://github.com/kanjitalk755/macemu.git
synced 2025-01-11 10:30:09 +00:00
dyngen: Fix more leaks.
This commit is contained in:
parent
a3a45f54e9
commit
4d5ed80740
@ -885,8 +885,10 @@ int load_object(const char *filename, FILE *outfile)
|
|||||||
char *demangled_name, *func_name;
|
char *demangled_name, *func_name;
|
||||||
if ((demangled_name = malloc(nd)) == NULL)
|
if ((demangled_name = malloc(nd)) == NULL)
|
||||||
return -1;
|
return -1;
|
||||||
if ((func_name = malloc(nf = nd)) == NULL)
|
if ((func_name = malloc(nf = nd)) == NULL) {
|
||||||
|
free(demangled_name);
|
||||||
return -1;
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
for(i = 0, sym = symtab; i < nb_syms; i++, sym++) {
|
for(i = 0, sym = symtab; i < nb_syms; i++, sym++) {
|
||||||
const char *name;
|
const char *name;
|
||||||
@ -914,6 +916,9 @@ int load_object(const char *filename, FILE *outfile)
|
|||||||
fprintf(outfile, "#endif\n");
|
fprintf(outfile, "#endif\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
free(func_name);
|
||||||
|
free(demangled_name);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user