From: Wilfried Göesgens Date: Sun, 13 Jul 2008 21:50:20 +0000 (+0000) Subject: * ignore null pointers to free. X-Git-Tag: v7.86~2103 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=a94fae6a5731c70d51d7d2e9a21c8b52905de54a;p=citadel.git * ignore null pointers to free. --- diff --git a/libcitadel/lib/stringbuf.c b/libcitadel/lib/stringbuf.c index 8e42b6333..f2581d7df 100644 --- a/libcitadel/lib/stringbuf.c +++ b/libcitadel/lib/stringbuf.c @@ -127,6 +127,8 @@ void FreeStrBuf (StrBuf **FreeMe) void HFreeStrBuf (void *VFreeMe) { StrBuf *FreeMe = (StrBuf*)VFreeMe; + if (FreeMe == NULL) + return; if (!FreeMe->ConstBuf) free(FreeMe->buf); free(FreeMe);