Few more memory leaks fixes (#14072)

This commit is contained in:
David CARLIER 2019-05-14 21:09:08 +01:00 committed by radare
parent 2bba203ebb
commit a51233bb3f
2 changed files with 2 additions and 0 deletions

View File

@ -92,6 +92,7 @@ static bool _fill_bin_symbol(struct r_bin_coff_obj *bin, int idx, RBinSymbol **s
static RBinImport *_fill_bin_import(struct r_bin_coff_obj *bin, int idx) {
RBinImport *ptr = R_NEW0 (RBinImport);
if (!ptr || idx < 0 || idx > bin->hdr.f_nsyms) {
R_FREE (ptr);
return NULL;
}
struct coff_symbol *s = &bin->symbols[idx];

View File

@ -73,6 +73,7 @@ static char *gdbr_read_feature(libgdbr_t *g, const char *file, ut64 *tot_len) {
retlen -= subret_space - subret_len;
ret[retlen] = '\0';
tmp = strstr (tmp3, "<xi:include");
free (subret);
continue;
}
if (subret_len > retmax - retlen - 1) {