diff options
author | yinpeijun <yinpeijun@huawei.com> | 2014-08-27 09:52:54 +0800 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2014-08-27 07:42:34 -0700 |
commit | 39b9575d675bc855df5d42f43795dd3fdf353387 (patch) | |
tree | 7af641e263a29fb6edd8c15f0ca9251030a033fd | |
parent | 47549bd296784db1dfefa1a309020bd5450384c4 (diff) | |
download | openvswitch-39b9575d675bc855df5d42f43795dd3fdf353387.tar.gz |
Fix memory leaks in error paths.
Found by Fortify.
Signed-off-by: yinpeijun <yinpeijun@huawei.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
-rw-r--r-- | lib/nx-match.c | 1 | ||||
-rw-r--r-- | ovsdb/execution.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/lib/nx-match.c b/lib/nx-match.c index 3bb71e2e4..53a761597 100644 --- a/lib/nx-match.c +++ b/lib/nx-match.c @@ -109,6 +109,7 @@ check_mask_consistency(const uint8_t *p, const struct mf_field *mf) "bits wildcarded by the mask. (Future versions " "of OVS may report this as an OpenFlow error.)", s); + free(s); break; } } diff --git a/ovsdb/execution.c b/ovsdb/execution.c index 027e9e18b..707c0dcc9 100644 --- a/ovsdb/execution.c +++ b/ovsdb/execution.c @@ -659,6 +659,7 @@ ovsdb_execute_wait(struct ovsdb_execution *x, struct ovsdb_parser *parser, error = ovsdb_row_from_json(row, rows->u.array.elems[i], x->symtab, NULL); if (error) { + ovsdb_row_destroy(row); break; } |