Skip to content
Snippets Groups Projects
Commit 322691a5 authored by Anthony Liguori's avatar Anthony Liguori
Browse files

Fix qemu_realloc() (Kevin Wolf)


For qemu_realloc with size == 0 a result of NULL is perfectly fine

Signed-off-by: default avatarKevin Wolf <kwolf@suse.de>
Signed-off-by: default avatarAnthony Liguori <aliguori@us.ibm.com>


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6615 c046a42c-6fe2-441c-8c8c-71466251a162
parent 9c22bc63
No related branches found
No related tags found
No related merge requests found
......@@ -48,7 +48,10 @@ void *qemu_malloc(size_t size)
void *qemu_realloc(void *ptr, size_t size)
{
return oom_check(realloc(ptr, size));
if (size)
return oom_check(realloc(ptr, size));
else
return realloc(ptr, size);
}
void *qemu_mallocz(size_t size)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment