Fix memory leak: destroy channel layer when closing.
[cascardo/rnetproxy.git] / hcconn.c
index 2f035ea..479db92 100644 (file)
--- a/hcconn.c
+++ b/hcconn.c
@@ -93,6 +93,7 @@ hc_conn_channel_close (gpointer data)
   g_source_remove (layer->watch);
   shutdown (fd, SHUT_RDWR);
   g_io_channel_unref (layer->channel);
+  g_slice_free (struct channel_layer, layer);
 }
 
 gboolean