diff options
author | Aurelien Jarno <aurelien@aurel32.net> | 2009-12-28 21:18:12 +0100 |
---|---|---|
committer | Aurelien Jarno <aurelien@aurel32.net> | 2010-01-03 03:14:37 +0100 |
commit | 3e372cf87fa0d9ab378c3dffed6b863bef4ed7a3 (patch) | |
tree | 1d92499f74d336cbb904979c2fa095129c481fd0 /vnc-tls.h | |
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>
Diffstat (limited to 'vnc-tls.h')
0 files changed, 0 insertions, 0 deletions