diff options
-rw-r--r-- | src/cache.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cache.c b/src/cache.c index e4a024b..1e544a2 100644 --- a/src/cache.c +++ b/src/cache.c @@ -340,8 +340,10 @@ cache_update_force(struct cache *c, struct nf_conntrack *ct) if (obj == NULL) return NULL; - if (cache_add(c, obj, id) == -1) + if (cache_add(c, obj, id) == -1) { + cache_object_free(obj); return NULL; + } return obj; } |