aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2017-01-23 23:32:59 +0100
committerPřemysl Janouch <p.janouch@gmail.com>2017-01-23 23:32:59 +0100
commitf76b060dc2a8aa85198a016b60588768f2a51244 (patch)
tree3d19c584a2b792aabb90e947d63f536775db3e7a
parenta1e9d660bdd46f1fad08e8ef3b08a936295f6f1a (diff)
downloadnncmpp-f76b060dc2a8aa85198a016b60588768f2a51244.tar.gz
nncmpp-f76b060dc2a8aa85198a016b60588768f2a51244.tar.xz
nncmpp-f76b060dc2a8aa85198a016b60588768f2a51244.zip
Mark some memory leaks to be fixed
-rw-r--r--nncmpp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/nncmpp.c b/nncmpp.c
index e274770..648fb36 100644
--- a/nncmpp.c
+++ b/nncmpp.c
@@ -1488,6 +1488,7 @@ app_process_action (enum action action)
if (g_ctx.volume >= 0)
{
char *volume = xstrdup_printf ("%d", MIN (100, g_ctx.volume + 10));
+ // FIXME: if this breaks, it leaks "volume"
MPD_SIMPLE ("setvol", volume)
free (volume);
}
@@ -1496,6 +1497,7 @@ app_process_action (enum action action)
if (g_ctx.volume >= 0)
{
char *volume = xstrdup_printf ("%d", MAX (0, g_ctx.volume - 10));
+ // FIXME: if this breaks, it leaks "volume"
MPD_SIMPLE ("setvol", volume)
free (volume);
}
@@ -1783,11 +1785,13 @@ current_tab_on_action (enum action action)
char *song;
case ACTION_CHOOSE:
song = xstrdup_printf ("%d", self->item_selected);
+ // FIXME: if this breaks, it leaks "volume"
MPD_SIMPLE ("play", song)
free (song);
return true;
case ACTION_DELETE:
song = xstrdup_printf ("%d", self->item_selected);
+ // FIXME: if this breaks, it leaks "volume"
MPD_SIMPLE ("delete", song)
free (song);
return true;