projects
/
citadel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Properly detect stream pointers to avaid crashes on freeing.`
[citadel.git]
/
libcitadel
/
lib
/
stringbuf.c
diff --git
a/libcitadel/lib/stringbuf.c
b/libcitadel/lib/stringbuf.c
index 7b2c663656e08fd874d788250c80a5333acd2877..5cbe17fdb560b003b3e3d25136e2ac73497e3da6 100644
(file)
--- 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)