summaryrefslogtreecommitdiff
path: root/src/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.c')
-rw-r--r--src/util.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/util.c b/src/util.c
index c0498aa..7e62755 100644
--- a/src/util.c
+++ b/src/util.c
@@ -21,6 +21,10 @@ EXIT_USAGE = 2;
void
freeit(const void **const ptr) {
+ if (ptr == NULL) {
+ return;
+ }
+
free((void *)*ptr);
*ptr = NULL;
}