aboutsummaryrefslogtreecommitdiff
path: root/src/dicache.c
diff options
context:
space:
mode:
authorHofmann Johannes <Johannes.Hofmann@gmx.de>2009-05-10 13:44:38 -0400
committerHofmann Johannes <Johannes.Hofmann@gmx.de>2009-05-10 13:44:38 -0400
commit2023266c7206c3fb456fda012ae0a4c81b69a634 (patch)
treee67d622e5a4623a5ab30fefabdc127bec0058c6b /src/dicache.c
parentfbc75f17d99ea52fd38352b165cfb2a1b8d710d0 (diff)
Fix a memory leak with DilloImage structures
Diffstat (limited to 'src/dicache.c')
-rw-r--r--src/dicache.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/dicache.c b/src/dicache.c
index 2e5a442b..8503cf66 100644
--- a/src/dicache.c
+++ b/src/dicache.c
@@ -403,11 +403,10 @@ static void *Dicache_image(int ImgType, const char *MimeType, void *Ptr,
dReturn_val_if_fail(MimeType && Ptr, NULL);
- if (!web->Image)
+ if (!web->Image) {
web->Image = a_Image_new(NULL, web->bgColor);
-
- /* Add an extra reference to the Image (for dicache usage) */
- a_Image_ref(web->Image);
+ a_Image_ref(web->Image);
+ }
DicEntry = a_Dicache_get_entry(web->url, DIC_Last);
if (!DicEntry) {