From: Daniel.Thibault@drdc-rddc.gc.ca (Thibault, Daniel)
Subject: [lttng-dev] [PATCH] create.c : Fix memory leak
Date: Tue, 31 Jan 2012 14:32:56 -0500 [thread overview]
Message-ID: <3CA1A65C03C1A34C81BBC6272782E696808A85@valcartierex01.valcartier.drdc-rddc.gc.ca> (raw)
In-Reply-To: <mailman.1.1328029202.19563.lttng-dev@lists.lttng.org>
From e85aacb4c42fc522fce58971abc85ed2fed70123 Tue, 31 Jan 2012 14:31:56 -0500
From: Daniel U. Thibault <daniel.thibault@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/>
next prev parent reply other threads:[~2012-01-31 19:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.1.1328029202.19563.lttng-dev@lists.lttng.org>
2012-01-31 17:31 ` [lttng-dev] [PATCH] Harmonise lttng.h and lttng-ctl.c documentation Thibault, Daniel
2012-01-31 19:04 ` [lttng-dev] [PATCH] add_context.c : Document return values, simplify session_name assignment in cmd_add_context() Thibault, Daniel
2012-01-31 19:32 ` Thibault, Daniel [this message]
2012-01-31 20:15 ` [lttng-dev] [PATCH] disable_channels.c improvements and fixes Thibault, Daniel
2012-01-31 21:41 ` [lttng-dev] [PATCH] disable_channels.c and enable_channels.c Thibault, Daniel
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=3CA1A65C03C1A34C81BBC6272782E696808A85@valcartierex01.valcartier.drdc-rddc.gc.ca \
--to=daniel.thibault@drdc-rddc.gc.ca \
/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