12 lines
403 B
Diff
12 lines
403 B
Diff
--- ./common/slp_xmalloc.c.orig 2016-09-13 11:46:35.749065088 +0000
|
|
+++ ./common/slp_xmalloc.c 2016-09-13 11:48:03.785749186 +0000
|
|
@@ -203,6 +203,8 @@ void * _xrealloc(const char * file, int
|
|
if (x->size != size)
|
|
{
|
|
newptr = _xmalloc(file, line, size);
|
|
+ if (!newptr)
|
|
+ return 0;
|
|
memcpy(newptr, ptr, x->size);
|
|
_xfree(file, line, x);
|
|
}
|