bug 762: Fix memory leak in ses_goto.
commitd89cebc0b3f0c693a7d40f80ad6c52ef92cb9902
authorKalle Olavi Niemitalo <kon@iki.fi>
Tue, 17 Feb 2009 08:11:22 +0000 (17 09:11 +0100)
committerWitold Filipczyk <nobody@nowhere>
Tue, 17 Feb 2009 08:11:22 +0000 (17 09:11 +0100)
tree4ab7d7b8ea237550b3b8c5026a667187d29e6973
parentb41e738905d03513c771a52faac1a51cda09e451
bug 762: Fix memory leak in ses_goto.

In src/session/task.c, if ses_goto() was going to ask the user to
confirm, it did:

    task->session_task.target.frame = null_or_stracpy(target_frame);

It added the struct task to a memory_list, so the structure was freed
when the message box was closed.  The target frame string was however
never freed.  To fix this leak, add the target frame string to the
memory_list too.

Alternatively, this could have been fixed by making post_yes() and
post_no() free the string.  It is however a bit better to use the
memory_list because msg_box() frees that even if it is unable to
display the message box.
NEWS
src/session/task.c