diff options
author | Hofmann Johannes <Johannes.Hofmann@gmx.de> | 2009-05-10 13:44:38 -0400 |
---|---|---|
committer | Hofmann Johannes <Johannes.Hofmann@gmx.de> | 2009-05-10 13:44:38 -0400 |
commit | 2023266c7206c3fb456fda012ae0a4c81b69a634 (patch) | |
tree | e67d622e5a4623a5ab30fefabdc127bec0058c6b /src/dicache.c | |
parent | fbc75f17d99ea52fd38352b165cfb2a1b8d710d0 (diff) |
Fix a memory leak with DilloImage structures
Diffstat (limited to 'src/dicache.c')
-rw-r--r-- | src/dicache.c | 7 |
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) { |