diff options
author | Chris Johns <chrisj@rtems.org> | 2014-07-24 17:10:39 +1000 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2014-07-24 17:10:39 +1000 |
commit | 0b81accba708e028d3e9828522907ca4fda77125 (patch) | |
tree | c8576cf7342e86423b60d84e603f6c2e310a5518 /rtl-rap.c | |
parent | 97a3d78f92fa29d18647d8d3f5f0a4f0a21cb393 (diff) |
Free memory after printing the error message.
Reported by Serg Kruglov <skruglov@nm.ru> on the user@rtems.org list.
Diffstat (limited to 'rtl-rap.c')
-rw-r--r-- | rtl-rap.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -616,12 +616,12 @@ rtems_rtl_rap_load_symbols (rtems_rtl_rap_t* rap, rtems_rtl_obj_t* obj) if (rtems_rtl_symbol_global_find (rap->strtab + name) && (ELF_ST_BIND (data & 0xffff) != STB_WEAK)) { + rtems_rtl_set_error (EINVAL, + "duplicate global symbol: %s", rap->strtab + name); free (obj->global_table); obj->global_table = NULL; obj->global_syms = 0; obj->global_size = 0; - rtems_rtl_set_error (EINVAL, - "duplicate global symbol: %s", rap->strtab + name); return false; } |