Signed-off-by: Lou Berger <[email protected]>
---
lib/memory.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lib/memory.c b/lib/memory.c
index 172ddfc..269520d 100644
--- a/lib/memory.c
+++ b/lib/memory.c
@@ -108,6 +108,9 @@ zrealloc (int type, void *ptr, size_t size)
{
void *memory;
+ if (ptr == NULL) /* is really alloc */
+ return zcalloc(type, size);
+
memory = realloc (ptr, size);
if (memory == NULL)
zerror ("realloc", type, size);
--
2.1.3
_______________________________________________
Quagga-dev mailing list
[email protected]
https://lists.quagga.net/mailman/listinfo/quagga-dev