summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJérémie Courrèges-Anglas <jca@wxcvbn.org>2013-08-08 13:03:56 +0200
committerJérémie Courrèges-Anglas <jca@wxcvbn.org>2013-08-08 13:03:56 +0200
commitdf842f317f02414f28b8c81394446fb273301eec (patch)
tree288e8f7dba0edcec697cd9b8ae68e34bc905dfe9
parentbe52c867c96763cca28fed963efadd8fa0d37889 (diff)
downloadratpoison-df842f317f02414f28b8c81394446fb273301eec.zip
Plug leak in cmd_sfrestore.
Noticed by Repolho <repolho at zoho dot com>, who came with a different fix.
-rw-r--r--src/actions.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/actions.c b/src/actions.c
index 1f2d0ca..2369067 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -5560,10 +5560,12 @@ cmd_sfrestore (int interactively UNUSED, struct cmdarg **args)
/* now restore the frames for each screen */
for (i = 0; i < num_screens; i++)
{
+ cmdret * ret;
push_frame_undo (&screens[i]); /* fdump to stack */
/* FIXME: store RET_SUCCESS || RET_FAILURE for each screen and output
it later */
- frestore (sbuf_get (buffer[i]), &screens[i]);
+ ret = frestore (sbuf_get (buffer[i]), &screens[i]);
+ cmdret_free (ret);
sbuf_free (buffer[i]);
}