Skip to content

Commit

Permalink
db-ctl-base: fix memory leak in cmd-get() function
Browse files Browse the repository at this point in the history
Memory leak occured in case specified key was not found in table
record.

Signed-off-by: Damijan Skvarc <damjan.skvarc@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
  • Loading branch information
damijans authored and blp committed Jul 5, 2019
1 parent d65586b commit 7b34595
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/db-ctl-base.c
Original file line number Diff line number Diff line change
Expand Up @@ -986,6 +986,7 @@ cmd_get(struct ctl_context *ctx)
ctx, "no key \"%s\" in %s record \"%s\" column %s",
key_string, table->name, record_id, column->name);
free(key_string);
ovsdb_atom_destroy(&key, column->type.key.type);
return;
}
} else {
Expand Down

0 comments on commit 7b34595

Please sign in to comment.