[lttng-dev] [PATCH] create.c : Fix memory leak

David Goulet dgoulet at efficios.com
Wed Feb 1 12:54:11 EST 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Merged

Thanks!

On 12-01-31 02:32 PM, Thibault, Daniel wrote:
> From e85aacb4c42fc522fce58971abc85ed2fed70123 Tue, 31 Jan 2012 14:31:56 -0500
> From: Daniel U. Thibault <daniel.thibault at drdc-rddc.gc.ca>
> Date: Tue, 31 Jan 2012 14:31:47 -0500
> Subject: [PATCH] create.c : Fix memory leak
> 
> Signed-off-by: Daniel U. Thibault <daniel.thibault at drdc-rddc.gc.ca>
> 
> diff --git a/src/bin/lttng/commands/create.c b/src/bin/lttng/commands/create.c
> index 99e5daa..e521024 100644
> --- a/src/bin/lttng/commands/create.c
> +++ b/src/bin/lttng/commands/create.c
> @@ -132,6 +132,10 @@
>  	ret = CMD_SUCCESS;
>  
>  error:
> +	if (opt_session_name == NULL) {
> +		free(session_name);
> +	}
> +
>  	if (alloc_path) {
>  		free(alloc_path);
>  	}
> ------------------------------
> 
> Daniel U. Thibault
> R & D pour la défense Canada - Valcartier (RDDC Valcartier) / Defence R&D Canada - Valcartier (DRDC Valcartier)
> Système de systèmes (SdS) / System of Systems (SoS)
> Solutions informatiques et expérimentations (SIE) / Computing Solutions and Experimentations (CSE)
> 2459 Boul. Pie XI Nord
> Québec, QC  G3J 1X5
> CANADA
> Vox : (418) 844-4000 x4245
> Fax : (418) 844-4538
> NAC: 918V QSDJ
> Gouvernement du Canada / Government of Canada
> <http://www.valcartier.drdc-rddc.gc.ca/>
> 
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQEcBAEBAgAGBQJPKXxDAAoJEELoaioR9I02mXsIALzHh8DiOshs2twjjYGOX20A
SgA/WxeWlc866VFOIaUzMmpVjDV84VAYKeqrxRiYOFxySzide2gaolPDSzm2iTxD
qqQNOgZtV+6XXiRWlCJteNIA5DeZXRYbAnWIwwGB0yGRVN2DpurCCgW1vSq1Kklc
vtE6bv25MvH6+fdKgZgjnACCIlFqMIb5/RYY/KSMTTlsOjPoK6TeVBBJUv2ZRj7R
SUt6sNe4HNPNpDqXRu3nQ6YI1z9fN7a6CvS7n+TLkCt9qVsscFtXBRW0WGpCGDPr
TDPwoC+/xsUL0z7l4AWDmK1dKhFqJyPawbI6sOxh1+1uwy2anUEpyWV423f/s1Q=
=bWqJ
-----END PGP SIGNATURE-----



More information about the lttng-dev mailing list