Oops, fix memory leak just introduced by 3fcdbd32b2
authorSteve Hay <steve.m.hay@googlemail.com>
Fri, 16 Nov 2012 14:21:06 +0000 (14:21 +0000)
committerSteve Hay <steve.m.hay@googlemail.com>
Fri, 16 Nov 2012 14:21:06 +0000 (14:21 +0000)
win32/win32.c

index cc2f095..c14b11b 100644 (file)
@@ -4242,8 +4242,10 @@ ansify_path(void)
     wide_path = (WCHAR*)win32_malloc(len*sizeof(WCHAR));
     while (wide_path) {
         size_t newlen = GetEnvironmentVariableW(L"PATH", wide_path, len);
-        if (newlen == 0)
+        if (newlen == 0) {
+            win32_free(wide_path);
             return;
+        }
         if (newlen < len)
             break;
         len = newlen;