roken: rk_strpoolfree(NULL) should work

This commit is contained in:
Nicolas Williams
2020-12-17 21:53:38 -06:00
parent 137638a6fe
commit 01fb86c0a6

View File

@@ -49,7 +49,7 @@ struct rk_strpool {
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
rk_strpoolfree(struct rk_strpool *p) rk_strpoolfree(struct rk_strpool *p)
{ {
if (p->str) { if (p && p->str) {
free(p->str); free(p->str);
p->str = NULL; p->str = NULL;
} }