state_s should be freed always before exit parse_ct_state

Signed-off-by: Li RongQing <[email protected]>
---
 lib/flow.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/flow.c b/lib/flow.c
index c6e47781b..479b7fe46 100644
--- a/lib/flow.c
+++ b/lib/flow.c
@@ -1261,6 +1261,7 @@ parse_ct_state(const char *state_str, uint32_t 
default_state,
         if (!bit) {
             ds_put_format(ds, "%s: unknown connection tracking state flag",
                           cs);
+            free(state_s);
             return false;
         }
         state |= bit;
-- 
2.16.2

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to