From: simon Date: Wed, 29 Dec 2010 13:35:44 +0000 (+0000) Subject: Vyacheslav Andrejev points out a heap management goof in the new jump X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/commitdiff_plain/5165dd4f26a619c4bf8577314599174cef66a977 Vyacheslav Andrejev points out a heap management goof in the new jump list code. Free the old value of the pointer variable we just overwrote, not the new one! git-svn-id: svn://svn.tartarus.org/sgt/putty@9062 cda61777-01e9-0310-a592-d414129be87e --- diff --git a/windows/winstore.c b/windows/winstore.c index 99b1ab8a..aae5a4c6 100644 --- a/windows/winstore.c +++ b/windows/winstore.c @@ -699,8 +699,8 @@ static int transform_jumplist_registry ret = RegSetValueEx(pjumplist_key, reg_jumplist_value, 0, REG_MULTI_SZ, new_value, piterator_new - new_value); + sfree(old_value); old_value = new_value; - sfree(new_value); } else ret = ERROR_SUCCESS;