From 3b5f32c83c2a400dc28237b0d54c7765ef815b58 Mon Sep 17 00:00:00 2001 From: Ralph Corderoy Date: Sat, 22 Oct 2016 00:26:02 +0100 Subject: [PATCH] Replace `if (p) free(p)' with `mh_xfree(p)'. --- sbr/utils.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sbr/utils.c b/sbr/utils.c index fbada4e6..f5f20570 100644 --- a/sbr/utils.c +++ b/sbr/utils.c @@ -46,9 +46,7 @@ void *mh_xrealloc(void *ptr, size_t size) /* Copy POSIX behaviour, coping with non-POSIX systems. */ if (size == 0) { - if (ptr) { - free(ptr); - } + mh_xfree(ptr); return mh_xmalloc(1); /* Get a unique pointer. */ } if (!ptr) -- 2.56.0