dev.dpdk.org archive mirror
 help / color / mirror / Atom feed
From: Reshma Pattan <reshma.pattan@intel.com>
To: dev@dpdk.org
Cc: kevin.laatz@intel.com, Reshma Pattan <reshma.pattan@intel.com>,
	stable@dpdk.org, bruce.richardson@intel.com
Subject: [dpdk-dev] [PATCH] lib/telemetry: fix memory leak
Date: Wed, 29 May 2019 13:43:17 +0100	[thread overview]
Message-ID: <20190529124317.30611-1-reshma.pattan@intel.com> (raw)

Free the `values` pointer before returning
from rte_telemetry_command_ports_all_stat_values()
to avoid memory leak.

Fixes: c12cefa379 ("telemetry: fix mapping of statistics")
CC: stable@dpdk.org
CC: bruce.richardson@intel.com

Signed-off-by: Reshma Pattan <reshma.pattan@intel.com>
---
 lib/librte_telemetry/rte_telemetry_parser.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/librte_telemetry/rte_telemetry_parser.c b/lib/librte_telemetry/rte_telemetry_parser.c
index 9bc16eef4..e9297021a 100644
--- a/lib/librte_telemetry/rte_telemetry_parser.c
+++ b/lib/librte_telemetry/rte_telemetry_parser.c
@@ -342,6 +342,7 @@ rte_telemetry_command_ports_all_stat_values(struct telemetry_impl *telemetry,
 		goto fail;
 	}
 
+	free(values);
 	return 0;
 
 fail:
-- 
2.21.0


             reply	other threads:[~2019-05-29 12:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-29 12:43 Reshma Pattan [this message]
2019-05-31 12:15 ` [dpdk-dev] [PATCH] lib/telemetry: fix memory leak Laatz, Kevin
2019-06-18  9:10   ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190529124317.30611-1-reshma.pattan@intel.com \
    --to=reshma.pattan@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=kevin.laatz@intel.com \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).