From 3211033ae3ed6a055d4bc296ee8ff847f571640c Mon Sep 17 00:00:00 2001 From: Ilya Maximets Date: Fri, 20 Nov 2020 01:17:20 +0100 Subject: [PATCH 12/16] actions: Fix leak of dynamic string on fwd group encoding failure. CC: Manoj Sharma Fixes: edb240081518 ("Forwarding group to load balance l2 traffic with liveness detection") Acked-by: Dumitru Ceara Signed-off-by: Ilya Maximets Signed-off-by: Numan Siddique (cherry-picked from master commit 61d209bbf2abacb71cdb63555fe1fe6b0020daf3) --- lib/actions.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/actions.c b/lib/actions.c index 156ebb2fe..3219ab3be 100644 --- a/lib/actions.c +++ b/lib/actions.c @@ -3448,6 +3448,7 @@ encode_FWD_GROUP(const struct ovnact_fwd_group *fwd_group, /* Find the tunnel key of the logical port */ if (!ep->lookup_port(ep->aux, port_name, &port_tunnel_key)) { + ds_destroy(&ds); return; } ds_put_format(&ds, ",bucket="); @@ -3455,6 +3456,7 @@ encode_FWD_GROUP(const struct ovnact_fwd_group *fwd_group, if (fwd_group->liveness) { /* Find the openflow port number of the tunnel port */ if (!ep->tunnel_ofport(ep->aux, port_name, &ofport)) { + ds_destroy(&ds); return; } -- 2.28.0