« Previous | Next » 

Revision 3e372cf8

ID3e372cf87fa0d9ab378c3dffed6b863bef4ed7a3

Added by Aurelien Jarno over 14 years ago

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 <>
Acked-by: Michael S. Tsirkin <>

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences