From b2778bcb8c37705ea97fee58199446d83dbda927 Mon Sep 17 00:00:00 2001 From: "Darrick J. Wong" Date: Thu, 12 Dec 2013 13:13:51 -0500 Subject: [PATCH] libquota: fix memory leak (on error path) Signed-off-by: Darrick J. Wong Signed-off-by: "Theodore Ts'o" --- lib/quota/mkquota.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/quota/mkquota.c b/lib/quota/mkquota.c index a0d3a2a..3aa8100 100644 --- a/lib/quota/mkquota.c +++ b/lib/quota/mkquota.c @@ -230,6 +230,7 @@ errcode_t quota_init_context(quota_ctx_t *qctx, ext2_filsys fs, int qtype) err = ext2fs_get_mem(sizeof(dict_t), &dict); if (err) { log_err("Failed to allocate dictionary"); + quota_release_context(&ctx); return err; } ctx->quota_dict[i] = dict; -- 1.8.3.1