projects
/
claws.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
f46d693
)
Do not leak memory and unref the result if valid
author
Ricardo Mones
<ricardo@mones.org>
Thu, 2 May 2013 08:23:38 +0000
(10:23 +0200)
committer
Ricardo Mones
<ricardo@mones.org>
Thu, 2 May 2013 08:23:38 +0000
(10:23 +0200)
src/news.c
patch
|
blob
|
history
diff --git
a/src/news.c
b/src/news.c
index 1102b4bcf454911cfda48b9909fc840e189dbb50..3717569472e995177d01cb6dd8ae830812353952 100644
(file)
--- a/
src/news.c
+++ b/
src/news.c
@@
-799,8
+799,11
@@
static gint news_get_article(Folder *folder, gint num, gchar *filename)
r = nntp_threaded_article(folder, num, &result, &len);
if (r == NEWSNNTP_NO_ERROR) {
- if (str_write_to_file(result, filename) < 0)
+ if (str_write_to_file(result, filename) < 0) {
+ mmap_string_unref(result);
return -1;
+ }
+ mmap_string_unref(result);
}
return r;