From 7dab9e5573cb2c540e5aeff16aaa08ec2d0196ef Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Wed, 29 Dec 2010 13:35:44 +0000 Subject: [PATCH] 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! [originally from svn r9062] --- windows/winstore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;