DPDK-dev Archive on lore.kernel.org
 help / color / Atom feed
* [dpdk-dev] [PATCH] lib/telemetry: fix memory leak
@ 2019-05-29 12:43 Reshma Pattan
  2019-05-31 12:15 ` Laatz, Kevin
  0 siblings, 1 reply; 3+ messages in thread
From: Reshma Pattan @ 2019-05-29 12:43 UTC (permalink / raw)
  To: dev; +Cc: kevin.laatz, Reshma Pattan, stable, bruce.richardson

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] lib/telemetry: fix memory leak
  2019-05-29 12:43 [dpdk-dev] [PATCH] lib/telemetry: fix memory leak Reshma Pattan
@ 2019-05-31 12:15 ` Laatz, Kevin
  2019-06-18  9:10   ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Laatz, Kevin @ 2019-05-31 12:15 UTC (permalink / raw)
  To: Reshma Pattan, dev; +Cc: stable, bruce.richardson

On 29/05/2019 13:43, Reshma Pattan wrote:
> 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:

Acked-by: Kevin Laatz <kevin.laatz@intel.com>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [dpdk-stable] [PATCH] lib/telemetry: fix memory leak
  2019-05-31 12:15 ` Laatz, Kevin
@ 2019-06-18  9:10   ` " Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2019-06-18  9:10 UTC (permalink / raw)
  To: Reshma Pattan; +Cc: stable, Laatz, Kevin, dev, bruce.richardson

31/05/2019 15:15, Laatz, Kevin:
> On 29/05/2019 13:43, Reshma Pattan wrote:
> > 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>
> 
> Acked-by: Kevin Laatz <kevin.laatz@intel.com>

Applied, thanks




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-29 12:43 [dpdk-dev] [PATCH] lib/telemetry: fix memory leak Reshma Pattan
2019-05-31 12:15 ` Laatz, Kevin
2019-06-18  9:10   ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon

DPDK-dev Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/dpdk-dev/0 dpdk-dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dpdk-dev dpdk-dev/ https://lore.kernel.org/dpdk-dev \
		dev@dpdk.org dpdk-dev@archiver.kernel.org
	public-inbox-index dpdk-dev


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/ public-inbox