From e8f0a6c31558306e8ba03bd0d4d8647c39c0e563 Mon Sep 17 00:00:00 2001 From: Claudio Takahasi Date: Thu, 9 Feb 2012 12:41:37 -0300 Subject: [PATCH] GAttrib: Fix leak when remote disconnects --- attrib/gattrib.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/attrib/gattrib.c b/attrib/gattrib.c index ccddabe2f..12a9fcf53 100644 --- a/attrib/gattrib.c +++ b/attrib/gattrib.c @@ -193,10 +193,11 @@ static void attrib_destroy(GAttrib *attrib) if (attrib->write_watch > 0) g_source_remove(attrib->write_watch); - if (attrib->read_watch > 0) { + if (attrib->read_watch > 0) g_source_remove(attrib->read_watch); + + if (attrib->io) g_io_channel_unref(attrib->io); - } g_free(attrib->buf); -- 2.47.3