From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel.Thibault@drdc-rddc.gc.ca (Thibault, Daniel) Date: Tue, 31 Jan 2012 14:32:56 -0500 Subject: [lttng-dev] [PATCH] create.c : Fix memory leak In-Reply-To: References: Message-ID: <3CA1A65C03C1A34C81BBC6272782E696808A85@valcartierex01.valcartier.drdc-rddc.gc.ca> >From e85aacb4c42fc522fce58971abc85ed2fed70123 Tue, 31 Jan 2012 14:31:56 -0500 From: Daniel U. Thibault Date: Tue, 31 Jan 2012 14:31:47 -0500 Subject: [PATCH] create.c : Fix memory leak Signed-off-by: Daniel U. Thibault 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