error string should be freed in all cases.
Signed-off-by: Madhu Challa <[email protected]>
---
vtep/vtep-ctl.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/vtep/vtep-ctl.c b/vtep/vtep-ctl.c
index 0b9463a..064ad1f 100644
--- a/vtep/vtep-ctl.c
+++ b/vtep/vtep-ctl.c
@@ -3199,11 +3199,13 @@ cmd_remove(struct vtep_ctl_context *ctx)
error = ovsdb_datum_from_string(&rm, &rm_type,
ctx->argv[i], ctx->symtab);
if (error && ovsdb_type_is_map(&rm_type)) {
- free(error);
rm_type.value.type = OVSDB_TYPE_VOID;
die_if_error(ovsdb_datum_from_string(&rm, &rm_type,
ctx->argv[i],
ctx->symtab));
}
+ if (error) {
+ free(error);
+ }
ovsdb_datum_subtract(&old, type, &rm, &rm_type);
ovsdb_datum_destroy(&rm, &rm_type);
}
--
1.7.9.5
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev