« Previous | Next » 

Revision 29718712

ID29718712eb2e53c09d28f08e39f6514d690f6fd3

Added by Stefan Weil over 13 years ago

bsd-user: Fix possible memory leaks and wrong realloc call

These errors were reported by cppcheck:

[bsd-user/elfload.c:1108]: (error) Common realloc mistake: "syms" nulled but not freed upon failure
[bsd-user/elfload.c:1076]: (error) Memory leak: s
[bsd-user/elfload.c:1079]: (error) Memory leak: syms

v2:
  • The previous fix for memory leaks was incomplete (thanks to Peter Maydell for te hint).
  • Fix wrong realloc usage, too.

Cc: Blue Swirl <>
Signed-off-by: Stefan Weil <>
Signed-off-by: Blue Swirl <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences