Leak fixes (#8060)

This commit is contained in:
Fangrui Song 2017-07-29 18:57:02 -07:00 committed by radare
parent 054d35b570
commit c1472e6630
2 changed files with 3 additions and 1 deletions

View File

@ -365,7 +365,8 @@ R_API char *r_anal_type_func_guess(RAnal *anal, char *func_name) {
goto out;
}
}
return NULL;
result = NULL;
goto out;
}
out:
free (str);

View File

@ -198,6 +198,7 @@ int file_buffer(RMagic *ms, int fd, const char *inname, const void *buf, size_t
int file_reset(RMagic *ms) {
if (!ms)
return 0;
free (ms->o.buf);
ms->o.buf = NULL;
ms->haderr = 0;
ms->error = -1;