mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-02-07 03:56:12 +00:00
http_download_file - free buffer at the end
This commit is contained in:
parent
5e920393ac
commit
5044128d92
@ -78,12 +78,16 @@ bool http_download_file(char *url, const char *output_dir,
|
||||
f = fopen(output_path, "wb");
|
||||
|
||||
if (!f)
|
||||
return false;
|
||||
goto cleanup;
|
||||
|
||||
fwrite(buf, 1, len, f);
|
||||
|
||||
fclose(f);
|
||||
|
||||
cleanup:
|
||||
if (buf)
|
||||
free(buf);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user