From d4f720a060b7c9318b143de1f19111aa56bb3740 Mon Sep 17 00:00:00 2001 From: Jakub Sitnicki Date: Mon, 2 Jul 2018 12:50:14 +0200 Subject: db-ctl-base: Fix resource deallocation on error path in cmd_find(). Release resources now that we are returning to the caller on error. Signed-off-by: Jakub Sitnicki Signed-off-by: Ben Pfaff --- lib/db-ctl-base.c | 1 + 1 file changed, 1 insertion(+) (limited to 'lib') diff --git a/lib/db-ctl-base.c b/lib/db-ctl-base.c index 13b4e4f72..df2d4300b 100644 --- a/lib/db-ctl-base.c +++ b/lib/db-ctl-base.c @@ -1285,6 +1285,7 @@ cmd_find(struct ctl_context *ctx) ctx->error = check_condition(table, row, ctx->argv[i], ctx->symtab, &satisfied); if (ctx->error) { + free(columns); return; } if (!satisfied) { -- cgit v1.2.1