[lttng-dev] [PATCH] For all commands/*.c, add poptFreeContext()

Thibault, Daniel Daniel.Thibault at drdc-rddc.gc.ca
Tue Jan 31 16:38:15 EST 2012


>From c297ddf1295b316d1133a49bc8d2fa08f115dcdc Tue, 31 Jan 2012 16:32:47 -0500
From: Daniel U. Thibault <daniel.thibault at drdc-rddc.gc.ca>
Date: Tue, 31 Jan 2012 16:32:33 -0500
Subject: [PATCH] For all commands/*.c, add poptFreeContext()

Signed-off-by: Daniel U. Thibault <daniel.thibault at drdc-rddc.gc.ca>

diff --git a/src/bin/lttng/commands/add_context.c b/src/bin/lttng/commands/add_context.c
index 2f6f11c..d37ece3 100644
--- a/src/bin/lttng/commands/add_context.c
+++ b/src/bin/lttng/commands/add_context.c
@@ -531,5 +531,6 @@
 		free(type);
 	}
 
+	poptFreeContext(pc);
 	return ret;
 }
diff --git a/src/bin/lttng/commands/calibrate.c b/src/bin/lttng/commands/calibrate.c
index a60cadf..591c869 100644
--- a/src/bin/lttng/commands/calibrate.c
+++ b/src/bin/lttng/commands/calibrate.c
@@ -237,5 +237,6 @@
 	ret = calibrate_lttng();
 
 end:
+	poptFreeContext(pc);
 	return ret;
 }
diff --git a/src/bin/lttng/commands/create.c b/src/bin/lttng/commands/create.c
index e521024..8f61743 100644
--- a/src/bin/lttng/commands/create.c
+++ b/src/bin/lttng/commands/create.c
@@ -179,5 +179,6 @@
 	ret = create_session();
 
 end:
+	poptFreeContext(pc);
 	return ret;
 }
diff --git a/src/bin/lttng/commands/destroy.c b/src/bin/lttng/commands/destroy.c
index 441b858..6949154 100644
--- a/src/bin/lttng/commands/destroy.c
+++ b/src/bin/lttng/commands/destroy.c
@@ -148,5 +148,6 @@
 	ret = destroy_session();
 
 end:
+	poptFreeContext(pc);
 	return ret;
 }
diff --git a/src/bin/lttng/commands/disable_channels.c b/src/bin/lttng/commands/disable_channels.c
index 4202963..f6929e6 100644
--- a/src/bin/lttng/commands/disable_channels.c
+++ b/src/bin/lttng/commands/disable_channels.c
@@ -204,5 +210,6 @@
 	}
 
 end:
+	poptFreeContext(pc);
 	return ret;
 }
diff --git a/src/bin/lttng/commands/disable_events.c b/src/bin/lttng/commands/disable_events.c
index 7f7b50c..4d21f68 100644
--- a/src/bin/lttng/commands/disable_events.c
+++ b/src/bin/lttng/commands/disable_events.c
@@ -246,5 +246,6 @@
 	ret = disable_events(session_name);
 
 end:
+	poptFreeContext(pc);
 	return ret;
 }
diff --git a/src/bin/lttng/commands/enable_channels.c b/src/bin/lttng/commands/enable_channels.c
index 03de524..7bebf76 100644
--- a/src/bin/lttng/commands/enable_channels.c
+++ b/src/bin/lttng/commands/enable_channels.c
@@ -274,24 +319,26 @@
	ret = enable_channel(session_name);

 end:
+	poptFreeContext(pc);
 	return ret;
 }
diff --git a/src/bin/lttng/commands/enable_events.c b/src/bin/lttng/commands/enable_events.c
index 3f30ab8..01fae84 100644
--- a/src/bin/lttng/commands/enable_events.c
+++ b/src/bin/lttng/commands/enable_events.c
@@ -471,5 +471,6 @@
 		free(session_name);
 	}
 
+	poptFreeContext(pc);
 	return ret;
 }
diff --git a/src/bin/lttng/commands/list.c b/src/bin/lttng/commands/list.c
index 701ce83..54e4c44 100644
--- a/src/bin/lttng/commands/list.c
+++ b/src/bin/lttng/commands/list.c
@@ -667,5 +667,6 @@
 	}
 	lttng_destroy_handle(handle);
 
+	poptFreeContext(pc);
 	return ret;
 }
diff --git a/src/bin/lttng/commands/set_session.c b/src/bin/lttng/commands/set_session.c
index f91935e..d4b9d02 100644
--- a/src/bin/lttng/commands/set_session.c
+++ b/src/bin/lttng/commands/set_session.c
@@ -113,5 +113,6 @@
 	ret = set_session();
 
 end:
+	poptFreeContext(pc);
 	return ret;
 }
diff --git a/src/bin/lttng/commands/start.c b/src/bin/lttng/commands/start.c
index b2a4980..52a624f 100644
--- a/src/bin/lttng/commands/start.c
+++ b/src/bin/lttng/commands/start.c
@@ -128,5 +128,6 @@
 	ret = start_tracing();
 
 end:
+	poptFreeContext(pc);
 	return ret;
 }
diff --git a/src/bin/lttng/commands/stop.c b/src/bin/lttng/commands/stop.c
index 82c9b4e..1db4432 100644
--- a/src/bin/lttng/commands/stop.c
+++ b/src/bin/lttng/commands/stop.c
@@ -125,5 +125,6 @@
 	ret = stop_tracing();
 
 end:
+	poptFreeContext(pc);
 	return ret;
 }
diff --git a/src/bin/lttng/commands/version.c b/src/bin/lttng/commands/version.c
index f288ba4..af24374 100644
--- a/src/bin/lttng/commands/version.c
+++ b/src/bin/lttng/commands/version.c
@@ -85,5 +85,6 @@
 	MSG("\nlttng is free software and under the GPL license.");
 
 end:
+	poptFreeContext(pc);
 	return ret;
 }
------------------------------

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/>



More information about the lttng-dev mailing list