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

Closes #2065

Change-Id: I091aac6e81dc497668671427267d0ef2321ae8af
(cherry picked from commit 4c8e2262be)
rfuchs/2095
Tom Briden 3 months ago committed by Richard Fuchs
parent fda8a303d3
commit ef2f38378d

@ -49,6 +49,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_slice_free1(sizeof(*b), b);
}

Loading…
Cancel
Save