diff options
author | Steve Hay <steve.m.hay@googlemail.com> | 2012-11-16 14:21:06 +0000 |
---|---|---|
committer | Steve Hay <steve.m.hay@googlemail.com> | 2012-11-16 14:21:06 +0000 |
commit | cfd4abf2bf035401d8184babc5d1aca80208cd5b (patch) | |
tree | 434affe8f73f4dc673dfc018cd7e7a66e40dbb14 /win32 | |
parent | 3fcdbd32b23d57a14f2c17d16671c54ae6a034ca (diff) | |
download | perl-cfd4abf2bf035401d8184babc5d1aca80208cd5b.tar.gz |
Oops, fix memory leak just introduced by 3fcdbd32b2
Diffstat (limited to 'win32')
-rw-r--r-- | win32/win32.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/win32/win32.c b/win32/win32.c index cc2f095221..c14b11b2b1 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -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; |