diff mbox series

[ovs-dev,18/23] db-ctl-base: Fix resource deallocation on error path in cmd_find().

Message ID 20180702105019.10345-19-jkbs@redhat.com
State Accepted
Headers show
Series Don't use ctl_fatal() in command handlers from db-ctl-base | expand

Commit Message

Jakub Sitnicki July 2, 2018, 10:50 a.m. UTC
Release resources now that we are returning to the caller on error.

Signed-off-by: Jakub Sitnicki <jkbs@redhat.com>
---
 lib/db-ctl-base.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/lib/db-ctl-base.c b/lib/db-ctl-base.c
index 5f386cab5..d3ca4ca70 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) {