commit | 3e372cf87fa0d9ab378c3dffed6b863bef4ed7a3 | [log] [tgz] |
---|---|---|
author | Aurelien Jarno <aurelien@aurel32.net> | Mon Dec 28 21:18:12 2009 +0100 |
committer | Aurelien Jarno <aurelien@aurel32.net> | Sun Jan 03 03:14:37 2010 +0100 |
tree | 1d92499f74d336cbb904979c2fa095129c481fd0 | |
parent | b430a22562e8a3836f984aa3f8b5b62ebd249573 [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>