tst_preload: Fix realloc(NULL, size) case.
commit9dd2b6a1c757b73d58da9aa1c5b2af59b98c6adb
authorCyril Hrubis <metan@ucw.cz>
Sun, 22 Dec 2013 21:09:44 +0000 (22 22:09 +0100)
committerCyril Hrubis <metan@ucw.cz>
Sun, 22 Dec 2013 21:09:44 +0000 (22 22:09 +0100)
treed0f33b62eb6017164c05cd12e7172a52ba499ce3
parentd33f1e300065869146bc57be16c1696b04946803
tst_preload: Fix realloc(NULL, size) case.

In case the realloc() was called with NULL optr the code wrongly
searched for the old chunk and caused crash.

The fix is to return malloc(size) in this case instead.

Signed-off-by: Cyril Hrubis <metan@ucw.cz>
tests/framework/tst_preload.c