shell32: Free the correct pointer in XDG_UserDirLookup.
authorRob Shearman <robertshearman@gmail.com>
Thu, 19 Jun 2008 06:51:26 +0000 (07:51 +0100)
committerAlexandre Julliard <julliard@winehq.org>
Thu, 19 Jun 2008 09:54:57 +0000 (11:54 +0200)
out_ptr is a stack variable. *out_ptr is heap allocated and is what
was meant to be freed.

dlls/shell32/xdg.c

index c578b90b95c04a0c81bd78becece788c97965281..6eb13a2864c611ac0c63b3d777650f83a956ba48 100644 (file)
@@ -963,7 +963,7 @@ xdg_user_dir_lookup_error:
     if (FAILED(hr))
     {
         for (i = 0; i < num_dirs; i++) HeapFree(GetProcessHeap(), 0, out[i]);
-        HeapFree(GetProcessHeap(), 0, out_ptr);
+        HeapFree(GetProcessHeap(), 0, *out_ptr);
     }
     return hr;
 }