MT#55283 streambuf: check pointer isn't NULL before trying to free it

Closes #2065

Change-Id: I091aac6e81dc497668671427267d0ef2321ae8af
pull/2071/head
Tom Briden 3 months ago committed by Richard Fuchs
parent 1542f8f549
commit 4c8e2262be

@ -53,6 +53,8 @@ struct streambuf *streambuf_new(struct poller *p, int fd) {
void streambuf_destroy(struct streambuf *b) { void streambuf_destroy(struct streambuf *b) {
if(!b)
return;
g_string_free(b->buf, TRUE); g_string_free(b->buf, TRUE);
g_free(b); g_free(b);
} }

Loading…
Cancel
Save