diff mbox series

[ovs-dev,1/1] ovn-northd: fix memory leak in add_distributed_nat_routes() function

Message ID 1564726999-19473-1-git-send-email-damjan.skvarc@gmail.com
State Superseded
Headers show
Series [ovs-dev,1/1] ovn-northd: fix memory leak in add_distributed_nat_routes() function | expand

Commit Message

Damijan Skvarc Aug. 2, 2019, 6:23 a.m. UTC
Within this function actions & match dynamic strings are used as helper
variables for adding entries into logical flow table. Variables are
used several times in order to optimize number of memory allocations,
however at the end memory was forgotten to be deallocated.

Signed-off-by: Damijan Skvarc <damjan.skvarc@gmail.com>
Acked-by: Mark Michelson <mmichels@redhat.com>
Signed-off-by: Mark Michelson <mmichels@redhat.com>
---
 ovn/northd/ovn-northd.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

0-day Robot Aug. 2, 2019, 6:59 a.m. UTC | #1
Bleep bloop.  Greetings Damijan Skvarc, I am a robot and I have tried out your patch.
Thanks for your contribution.

I encountered some error that I wasn't expecting.  See the details below.


checkpatch:
WARNING: Unexpected sign-offs from developers who are not authors or co-authors or committers: Mark Michelson <mmichels@redhat.com>
Lines checked: 33, Warnings: 1, Errors: 0


Please check this out.  If you feel there has been an error, please email aconole@bytheb.org

Thanks,
0-day Robot
diff mbox series

Patch

diff --git a/ovn/northd/ovn-northd.c b/ovn/northd/ovn-northd.c
index ae09cf3..95b9570 100644
--- a/ovn/northd/ovn-northd.c
+++ b/ovn/northd/ovn-northd.c
@@ -5717,6 +5717,8 @@  add_distributed_nat_routes(struct hmap *lflows, const struct ovn_port *op)
             ds_clear(&actions);
         }
     }
+    ds_destroy(&match);
+    ds_destroy(&actions);
 }
 
 static void