mirror of
https://github.com/moparisthebest/curl
synced 2024-11-11 20:15:03 -05: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
@ -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…
Reference in New Issue
Block a user