From: Simon Tatham 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://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=784c720e786f498e5f91b570627b41a15a4c995b;p=PuTTY_svn.git 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: http://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;