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

Damijan Skvarc damjan.skvarc at gmail.com
Thu Aug 8 08:15:05 UTC 2019


On Wed, Aug 7, 2019 at 3:50 PM Numan Siddique <nusiddiq at redhat.com> wrote:

>
>
> On Wed, Aug 7, 2019 at 4:59 PM Damijan Skvarc <damjan.skvarc at gmail.com>
> wrote:
>
>> 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 at gmail.com>
>>
>
> Hi Damijan,
>
> This patch is already applied to ovn master repo a couple of days back -
> https://github.com/ovn-org/ovn/commit/c1ba3f68a78af3b852aa5709a0d96f001b63b243
>

Sorry, my mistake, I have incorrectly resent the same leftover artifact
file.

>
> Would you please submit the patch to OVS branch 2.12 so that it can be
> backported  (with the subject prefix - "branch 2.12")
>

I've already tried, but 0-day robot refused it, complaining about not
having Mark Michelson in a list of authors... (
https://mail.openvswitch.org/pipermail/ovs-dev/2019-August/361326.html).
Also branch 2.12 token was not specified in a subject. I'll retry once
more...


> Thanks
> Numan
>
>
>
>> ---
>>  northd/ovn-northd.c | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/northd/ovn-northd.c b/northd/ovn-northd.c
>> index 979dea4..8588961 100644
>> --- a/northd/ovn-northd.c
>> +++ b/northd/ovn-northd.c
>> @@ -5667,6 +5667,8 @@ add_distributed_nat_routes(struct hmap *lflows,
>> const struct ovn_port *op)
>>              ds_clear(&actions);
>>          }
>>      }
>> +    ds_destroy(&match);
>> +    ds_destroy(&actions);
>>  }
>>
>>  static void
>> --
>> 2.7.4
>>
>> _______________________________________________
>> dev mailing list
>> dev at openvswitch.org
>> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>>
>


More information about the dev mailing list