diff --git a/CHANGELOG.md b/CHANGELOG.md index cadfa8c51..aae4476b9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Changed ### Fixed - Unify GLib log domains [#479](https://github.com/greenbone/gvm-libs/pull/479) +- Fix double free. [#499](https://github.com/greenbone/gvm-libs/pull/499) ### Removed diff --git a/util/kb.c b/util/kb.c index 41937eee1..e5fd799e9 100644 --- a/util/kb.c +++ b/util/kb.c @@ -279,7 +279,6 @@ get_redis_ctx (struct kb_redis *kbr) kbr->rctx ? kbr->rctx->errstr : strerror (ENOMEM)); redisFree (kbr->rctx); kbr->rctx = NULL; - g_free (kbr->path); return -1; } @@ -289,7 +288,6 @@ get_redis_ctx (struct kb_redis *kbr) g_log (G_LOG_DOMAIN, G_LOG_LEVEL_CRITICAL, "No redis DB available"); redisFree (kbr->rctx); kbr->rctx = NULL; - g_free (kbr->path); return -2; }