summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2012-12-25 17:00:58 +0100
committerSebastien Helleu <flashcode@flashtux.org>2012-12-25 17:00:58 +0100
commit302b0f2f653fcb230cb6dab9313d554244f50127 (patch)
tree998183646a5f113794b121c2cd4bf2fc6bdaa525 /src
parent306b2094210be55d43e896f875cfb7b62b509fab (diff)
downloadweechat-302b0f2f653fcb230cb6dab9313d554244f50127.zip
script: add missing close of file in case of error when computing MD5 checksum of a file
Diffstat (limited to 'src')
-rw-r--r--src/plugins/script/script-repo.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/plugins/script/script-repo.c b/src/plugins/script/script-repo.c
index d7f9e280f..c8aba6ae9 100644
--- a/src/plugins/script/script-repo.c
+++ b/src/plugins/script/script-repo.c
@@ -762,6 +762,7 @@ script_repo_md5sum_file (const char *filename)
if ((int)fread (data, 1, st.st_size, file) < st.st_size)
{
free (data);
+ fclose (file);
return NULL;
}
fclose (file);