From: Wilfried Goesgens Date: Sun, 18 Jan 2015 14:31:44 +0000 (+0100) Subject: Properly detect stream pointers to avaid crashes on freeing.` X-Git-Tag: v9.01~33 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=96161e4d66bf6c1da07585920cd43f6a0a4f950e Properly detect stream pointers to avaid crashes on freeing.` --- diff --git a/libcitadel/lib/stringbuf.c b/libcitadel/lib/stringbuf.c index 7b2c66365..5cbe17fdb 100644 --- a/libcitadel/lib/stringbuf.c +++ b/libcitadel/lib/stringbuf.c @@ -2931,7 +2931,7 @@ void *StrBufNewStreamContext(eStreamType type) void StrBufDestroyStreamContext(eStreamType type, void **vStream) { - if (*vStream) { + if ((vStream == NULL) || (*vStream==NULL)) { return; } switch (type)