Am 18.01.2011 09:26, schrieb Markus Armbruster:
Stefan Weil <w...@mail.berlios.de> writes:
Extract from "man realloc":
"If realloc() fails the original block is left untouched;
it is not freed or moved."
Fix a possible memory leak (reported by cppcheck).
Cc: Riku Voipio <riku.voi...@iki.fi>
Signed-off-by: Stefan Weil <w...@mail.berlios.de>
Sidestep the problem via qemu_realloc() instead?
The same change was applied to bsd-user/elfload.c.
As symbol loading is not essential in most applications,
returning after out-of-memory should be better than
aborting (that's what qemu_realloc does).