diff --git a/lib/streambuf.c b/lib/streambuf.c index c820f7c04..52f4c9e5d 100644 --- a/lib/streambuf.c +++ b/lib/streambuf.c @@ -53,6 +53,8 @@ struct streambuf *streambuf_new(struct poller *p, int fd) { void streambuf_destroy(struct streambuf *b) { + if(!b) + return; g_string_free(b->buf, TRUE); g_free(b); }