mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-31 20:36:22 +00:00
Close FILE* before removing the filename.
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
This commit is contained in:
@@ -119,7 +119,7 @@ aesgcm_file_get(void* userdata)
|
|||||||
ssize_t bytes_received = *p_bytes_received;
|
ssize_t bytes_received = *p_bytes_received;
|
||||||
free(p_bytes_received);
|
free(p_bytes_received);
|
||||||
|
|
||||||
auto_FILE FILE* tmpfh = fopen(tmpname, "rb");
|
FILE* tmpfh = fopen(tmpname, "rb");
|
||||||
if (tmpfh == NULL) {
|
if (tmpfh == NULL) {
|
||||||
http_print_transfer_update(aesgcm_dl->window, aesgcm_dl->id,
|
http_print_transfer_update(aesgcm_dl->window, aesgcm_dl->id,
|
||||||
"Downloading '%s' failed: Unable to open "
|
"Downloading '%s' failed: Unable to open "
|
||||||
@@ -132,7 +132,7 @@ aesgcm_file_get(void* userdata)
|
|||||||
gcry_error_t crypt_res;
|
gcry_error_t crypt_res;
|
||||||
crypt_res = omemo_decrypt_file(tmpfh, outfh,
|
crypt_res = omemo_decrypt_file(tmpfh, outfh,
|
||||||
bytes_received, fragment);
|
bytes_received, fragment);
|
||||||
|
fclose(tmpfh);
|
||||||
remove(tmpname);
|
remove(tmpname);
|
||||||
|
|
||||||
if (crypt_res != GPG_ERR_NO_ERROR) {
|
if (crypt_res != GPG_ERR_NO_ERROR) {
|
||||||
|
|||||||
Reference in New Issue
Block a user