-
Aurelien Jarno authored
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>Aurelien Jarno authoredAccording 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>
Loading