summaryrefslogtreecommitdiff
path: root/src/interface.c
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2011-12-13 16:27:18 +0100
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2011-12-13 16:30:37 +0100
commit489e2955687bccb263e1ece3a1615b3356c990f2 (patch)
tree6e26b9497314ba8a066e32a4515b697723760276 /src/interface.c
parent5942e8483b712f1c83be625856ff7ee26ebc3898 (diff)
downloadpa-sink-ctl-489e2955687bccb263e1ece3a1615b3356c990f2.tar.gz
pa-sink-ctl-489e2955687bccb263e1ece3a1615b3356c990f2.tar.bz2
pa-sink-ctl-489e2955687bccb263e1ece3a1615b3356c990f2.zip
Fix some leaks
Diffstat (limited to 'src/interface.c')
-rw-r--r--src/interface.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/interface.c b/src/interface.c
index a744cfd..9cc31f8 100644
--- a/src/interface.c
+++ b/src/interface.c
@@ -198,10 +198,17 @@ interface_clear(struct context *ctx)
{
g_source_remove(ctx->resize_source_id);
g_source_remove(ctx->input_source_id);
+#ifdef HAVE_SIGNALFD
close(ctx->signal_fd);
+#endif
clear();
refresh();
+ delwin(ctx->menu_win);
+ delwin(ctx->msg_win);
endwin();
+ delscreen(NULL);
+ if (ctx->status)
+ g_free(ctx->status);
}
void
@@ -278,7 +285,8 @@ interface_init(struct context *ctx)
exit(EXIT_FAILURE);
ctx->signal_fd = signalfd(-1, &mask, 0);
channel = g_io_channel_unix_new(ctx->signal_fd);
- g_io_add_watch(channel, G_IO_IN, resize_gio, ctx);
+ ctx->resize_source_id =
+ g_io_add_watch(channel, G_IO_IN, resize_gio, ctx);
g_io_channel_unref(channel);
}
#else