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

Closes #2065

Change-Id: I091aac6e81dc497668671427267d0ef2321ae8af
(cherry picked from commit 4c8e2262be)
mr14.1
Tom Briden 3 months ago committed by Richard Fuchs
parent d4d48d1817
commit d85ab0f5c0

@ -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);
}

Loading…
Cancel
Save