From 96161e4d66bf6c1da07585920cd43f6a0a4f950e Mon Sep 17 00:00:00 2001 From: Wilfried Goesgens Date: Sun, 18 Jan 2015 15:31:44 +0100 Subject: [PATCH] Properly detect stream pointers to avaid crashes on freeing.` --- libcitadel/lib/stringbuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 2.30.2