mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-03 09:57:14 +08:00
13 lines
519 B
Diff
13 lines
519 B
Diff
|
diff -up openslp-2.0.0/common/slp_xmalloc.c.orig openslp-2.0.0/common/slp_xmalloc.c
|
||
|
--- a/openslp-2.0.0/common/slp_xmalloc.c.orig 2012-12-07 01:52:08.000000000 +0100
|
||
|
+++ b/openslp-2.0.0/common/slp_xmalloc.c 2016-05-23 12:58:57.953532979 +0200
|
||
|
@@ -203,6 +203,8 @@ void * _xrealloc(const char * file, int
|
||
|
if (x->size != size)
|
||
|
{
|
||
|
newptr = _xmalloc(file, line, size);
|
||
|
+ if (newptr == 0)
|
||
|
+ return 0;
|
||
|
memcpy(newptr, ptr, x->size);
|
||
|
_xfree(file, line, x);
|
||
|
}
|