Skip to content
Snippets Groups Projects
Commit 608b11a9 authored by Martin Vejnár's avatar Martin Vejnár Committed by Daniel Stenberg
Browse files

win32: fix a potential memory leak in Curl_load_library

If a call to GetSystemDirectory fails, the `path` pointer that was
previously allocated would be leaked. This makes sure that `path` is
always freed.

Closes #938
parent d6604524
No related branches found
No related tags found
No related merge requests found
......@@ -281,8 +281,8 @@ HMODULE Curl_load_library(LPCTSTR filename)
pLoadLibraryEx(path, NULL, LOAD_WITH_ALTERED_SEARCH_PATH) :
LoadLibrary(path);
free(path);
}
free(path);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment