From 01fb86c0a6a2cbc76e29f5e99d6a6448446634e6 Mon Sep 17 00:00:00 2001 From: Nicolas Williams Date: Thu, 17 Dec 2020 21:53:38 -0600 Subject: [PATCH] roken: rk_strpoolfree(NULL) should work --- lib/roken/strpool.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/roken/strpool.c b/lib/roken/strpool.c index 6e6a737bc..14e579f6b 100644 --- a/lib/roken/strpool.c +++ b/lib/roken/strpool.c @@ -49,7 +49,7 @@ struct rk_strpool { ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL rk_strpoolfree(struct rk_strpool *p) { - if (p->str) { + if (p && p->str) { free(p->str); p->str = NULL; }