diff options
author | Jérémie Courrèges-Anglas <jca@wxcvbn.org> | 2013-08-08 13:03:56 +0200 |
---|---|---|
committer | Jérémie Courrèges-Anglas <jca@wxcvbn.org> | 2013-08-08 13:03:56 +0200 |
commit | df842f317f02414f28b8c81394446fb273301eec (patch) | |
tree | 288e8f7dba0edcec697cd9b8ae68e34bc905dfe9 | |
parent | be52c867c96763cca28fed963efadd8fa0d37889 (diff) | |
download | ratpoison-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.c | 4 |
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]); } |