summaryrefslogtreecommitdiff
path: root/openbsd-compat/bsd-malloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'openbsd-compat/bsd-malloc.c')
-rw-r--r--openbsd-compat/bsd-malloc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/openbsd-compat/bsd-malloc.c b/openbsd-compat/bsd-malloc.c
index 6402ab588..482facdc9 100644
--- a/openbsd-compat/bsd-malloc.c
+++ b/openbsd-compat/bsd-malloc.c
@@ -50,6 +50,8 @@ rpl_realloc(void *ptr, size_t size)
50{ 50{
51 if (size == 0) 51 if (size == 0)
52 size = 1; 52 size = 1;
53 if (ptr == 0)
54 return malloc(size);
53 return realloc(ptr, size); 55 return realloc(ptr, size);
54} 56}
55#endif 57#endif