From e53a14055f387bc3e641f703b9b505a2037a7cb5 Mon Sep 17 00:00:00 2001 From: Nalin Dahyabhai Date: Dec 15 2010 20:18:02 +0000 Subject: handle the should-never-happen case where p is NULL (D10057) --- diff --git a/src/store-files.c b/src/store-files.c index d3c3156..e15e0d4 100644 --- a/src/store-files.c +++ b/src/store-files.c @@ -311,9 +311,10 @@ free_if_empty_multi(void *parent, char *p) { char **s; int i, j, k; - if ((p != NULL) && (strlen(p) == 0)) { - talloc_free(p); - p = NULL; + if ((p == NULL) || (strlen(p) == 0)) { + if (p != NULL) { + talloc_free(p); + } return NULL; } s = talloc_zero_array(parent, char *, strlen(p) + 2);