diff options
author | Jorge Arellano Cid <jcid@dillo.org> | 2014-06-19 13:53:58 -0400 |
---|---|---|
committer | Jorge Arellano Cid <jcid@dillo.org> | 2014-06-19 13:53:58 -0400 |
commit | 2cc782748bbe4f84d248decf7e85bcfce31b0cdd (patch) | |
tree | cfefd594d8f0d8ce9cd110d894772816acdc2ce8 /src/dicache.c | |
parent | 79abba041d5dc8961d99fd45ea16382c6319226e (diff) |
Fixed a potential problem in a_Dicache_unref()
Currently I see no way to hit the condition, but better safe than sorry.
Diffstat (limited to 'src/dicache.c')
-rw-r--r-- | src/dicache.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/dicache.c b/src/dicache.c index 39d89509..82043590 100644 --- a/src/dicache.c +++ b/src/dicache.c @@ -224,6 +224,8 @@ void a_Dicache_unref(const DilloUrl *Url, int version) if (entry->RefCount > 0) --entry->RefCount; if (entry->v_imgbuf == NULL || (entry->RefCount == 0 && a_Imgbuf_last_reference(entry->v_imgbuf))) + if (entry->RefCount == 0 && + (!entry->v_imgbuf || a_Imgbuf_last_reference(entry->v_imgbuf))) Dicache_remove(Url, version); } } |