mirror of
https://github.com/curl/curl.git
synced 2026-05-03 05:07:52 +03:00
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
This commit is contained in:
parent
d6604524ad
commit
608b11a91f
1 changed files with 1 additions and 1 deletions
|
|
@ -281,8 +281,8 @@ HMODULE Curl_load_library(LPCTSTR filename)
|
|||
pLoadLibraryEx(path, NULL, LOAD_WITH_ALTERED_SEARCH_PATH) :
|
||||
LoadLibrary(path);
|
||||
|
||||
free(path);
|
||||
}
|
||||
free(path);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue