aboutsummaryrefslogtreecommitdiff
path: root/target-i386
diff options
context:
space:
mode:
authorAurelien Jarno <aurelien@aurel32.net>2009-12-28 21:18:12 +0100
committerAurelien Jarno <aurelien@aurel32.net>2010-01-03 03:14:37 +0100
commit3e372cf87fa0d9ab378c3dffed6b863bef4ed7a3 (patch)
tree1d92499f74d336cbb904979c2fa095129c481fd0 /target-i386
parentb430a22562e8a3836f984aa3f8b5b62ebd249573 (diff)
loader: don't call realloc(non_null, 0) when no symbols are present
According to C99, realloc(non_null, 0) != free(non_null), that's why it is forbidden in QEMU. When there are no symbols, nsyms equals to 0. Free the syms structure and set it to NULL instead of reallocating it with a size of 0. This fixes -kernel with stripped kernels. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> Acked-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'target-i386')
0 files changed, 0 insertions, 0 deletions