[ovs-dev] [PATCH] ofp-actions: Fix memory leak on error path in parse_CT().
Ben Pfaff
blp at ovn.org
Fri May 26 23:28:08 UTC 2017
Found by Coverity.
Reported-at: https://scan3.coverity.com/reports.htm#v16889/p10449/fileInstanceId=14762959&defectInstanceId=4305310&mergedDefectId=180392
Signed-off-by: Ben Pfaff <blp at ovn.org>
---
lib/ofp-actions.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/ofp-actions.c b/lib/ofp-actions.c
index 61e98601f117..af52f147df2e 100644
--- a/lib/ofp-actions.c
+++ b/lib/ofp-actions.c
@@ -5693,7 +5693,7 @@ parse_CT(char *arg, struct ofpbuf *ofpacts,
break;
}
}
- if (oc->flags & NX_CT_F_FORCE && !(oc->flags & NX_CT_F_COMMIT)) {
+ if (!error && oc->flags & NX_CT_F_FORCE && !(oc->flags & NX_CT_F_COMMIT)) {
error = xasprintf("\"force\" flag requires \"commit\" flag.");
}
ofpact_finish_CT(ofpacts, &oc);
--
2.10.2
More information about the dev
mailing list