mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-17 00:24:27 -04:00
[net] fix a small memory leak in the update check
* A 257-byte signature buffer was not being freed if check for BETAs was enabled.
This commit is contained in:
parent
8719412667
commit
7ec7331200
2 changed files with 8 additions and 6 deletions
|
@ -699,6 +699,9 @@ static DWORD WINAPI CheckForUpdatesThread(LPVOID param)
|
|||
#endif
|
||||
vuprintf("Using %s for the update check", RUFUS_URL);
|
||||
for (k=0; (k<max_channel) && (!found_new_version); k++) {
|
||||
// Free any previous buffers we might have used
|
||||
safe_free(buf);
|
||||
safe_free(sig);
|
||||
uprintf("Checking %s channel...", channel[k]);
|
||||
// At this stage we can query the server for various update version files.
|
||||
// We first try to lookup for "<appname>_<os_arch>_<os_version_major>_<os_version_minor>.ver"
|
||||
|
@ -770,7 +773,6 @@ static DWORD WINAPI CheckForUpdatesThread(LPVOID param)
|
|||
if (!pfHttpQueryInfoA(hRequest, HTTP_QUERY_CONTENT_LENGTH|HTTP_QUERY_FLAG_NUMBER, (LPVOID)&dwTotalSize, &dwSize, NULL))
|
||||
goto out;
|
||||
|
||||
safe_free(buf);
|
||||
// Make sure the file is NUL terminated
|
||||
buf = (char*)calloc(dwTotalSize+1, 1);
|
||||
if (buf == NULL)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue