diff mbox series

[ovs-dev,2/2] pinctrl: Fix memory leak when handling empty lb backends.

Message ID 20201027223020.19043.40260.stgit@dceara.remote.csb
State Accepted
Headers show
Series Fix memory leaks due to controller events. | expand

Commit Message

Dumitru Ceara Oct. 27, 2020, 10:30 p.m. UTC
Fixes: 7c3523c71932 ("OVN: introduce trigger_event() action")
Signed-off-by: Dumitru Ceara <dceara@redhat.com>
---
 controller/pinctrl.c |    3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/controller/pinctrl.c b/controller/pinctrl.c
index bc482c0..08adc10 100644
--- a/controller/pinctrl.c
+++ b/controller/pinctrl.c
@@ -5744,6 +5744,9 @@  pinctrl_handle_empty_lb_backends_opts(struct ofpbuf *userdata)
     if (!vip || !protocol || !load_balancer) {
         static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 5);
         VLOG_WARN_RL(&rl, "missing lb parameters in userdata");
+        free(vip);
+        free(protocol);
+        free(load_balancer);
         return false;
     }