aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2021-07-26 13:20:40 -0700
committerBruce Hill <bruce@bruce-hill.com>2021-07-26 13:20:40 -0700
commitd7030709801cde01739850a85f156d181554f520 (patch)
tree1aeaff12421231f6a809d7af80a2d4b7d4556b72
parentf5b9acc05c6b14c3cc7a41d38f86aed4edd68a76 (diff)
Fixed bug where pointer wasn't getting NULLed out
-rw-r--r--utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils.c b/utils.c
index 93f6ebd..3a950c8 100644
--- a/utils.c
+++ b/utils.c
@@ -153,7 +153,7 @@ void xfree(void *p)
if (*(void**)p == NULL)
errx(EXIT_FAILURE, "attempt to free(NULL)");
free(*(void**)p);
- p = NULL;
+ *((void**)p) = NULL;
}
// vim: ts=4 sw=0 et cino=L2,l1,(0,W4,m1