diff mbox series

[ovs-dev] netdev-dpdk: Fix memory leak in netdev_dpdk_get_custom_stats().

Message ID 1516638266-17669-1-git-send-email-i.maximets@samsung.com
State Accepted
Delegated to: Ian Stokes
Headers show
Series [ovs-dev] netdev-dpdk: Fix memory leak in netdev_dpdk_get_custom_stats(). | expand

Commit Message

Ilya Maximets Jan. 22, 2018, 4:24 p.m. UTC
CC: Michal Weglicki <michalx.weglicki@intel.com>
Fixes: 971f4b394c6e ("netdev: Custom statistics.")
Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
---
 lib/netdev-dpdk.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Stokes, Ian Jan. 22, 2018, 6:30 p.m. UTC | #1
> -----Original Message-----
> From: Ilya Maximets [mailto:i.maximets@samsung.com]
> Sent: Monday, January 22, 2018 4:24 PM
> To: ovs-dev@openvswitch.org
> Cc: Heetae Ahn <heetae82.ahn@samsung.com>; Ben Pfaff <blp@ovn.org>;
> Stokes, Ian <ian.stokes@intel.com>; Ilya Maximets
> <i.maximets@samsung.com>; Weglicki, MichalX <michalx.weglicki@intel.com>
> Subject: [PATCH] netdev-dpdk: Fix memory leak in
> netdev_dpdk_get_custom_stats().
> 
Thanks Ilya,

I'll add this to DPDK_MERGE for master and DPDK_MERGE_2_9 branch for the 2.9 release.

Ian
> CC: Michal Weglicki <michalx.weglicki@intel.com>
> Fixes: 971f4b394c6e ("netdev: Custom statistics.")
> Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
> ---
>  lib/netdev-dpdk.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index ac2e38e..a37c8df
> 100644
> --- a/lib/netdev-dpdk.c
> +++ b/lib/netdev-dpdk.c
> @@ -2359,6 +2359,8 @@ netdev_dpdk_get_custom_stats(const struct netdev
> *netdev,
>               * reconfigured */
>              netdev_dpdk_clear_xstats(dev);
>          }
> +
> +        free(values);
>      }
> 
>      ovs_mutex_unlock(&dev->mutex);
> --
> 2.7.4
diff mbox series

Patch

diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
index ac2e38e..a37c8df 100644
--- a/lib/netdev-dpdk.c
+++ b/lib/netdev-dpdk.c
@@ -2359,6 +2359,8 @@  netdev_dpdk_get_custom_stats(const struct netdev *netdev,
              * reconfigured */
             netdev_dpdk_clear_xstats(dev);
         }
+
+        free(values);
     }
 
     ovs_mutex_unlock(&dev->mutex);