mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2024-11-22 07:37:38 +01:00
Remove free() NULL pointer checks in load_debug_frame() error path
Just pass potentially NULL pointers to free() in the error path in load_debug_frame(). Saved 40 bytes of code in libunwind.so on ARM -O2 thumb build at the expense of slightly slower execution.
This commit is contained in:
parent
a745ac2f60
commit
90d7baea35
1 changed files with 3 additions and 3 deletions
|
@ -226,9 +226,9 @@ load_debug_frame (const char *file, char **buf, size_t *bufsize, int is_local)
|
|||
|
||||
/* An error reading image file. Release resources and return error code */
|
||||
file_error:
|
||||
if (stringtab) free(stringtab);
|
||||
if (sec_hdrs) free(sec_hdrs);
|
||||
if (linkbuf) free(linkbuf);
|
||||
free(stringtab);
|
||||
free(sec_hdrs);
|
||||
free(linkbuf);
|
||||
fclose(f);
|
||||
|
||||
return 1;
|
||||
|
|
Loading…
Reference in a new issue