[lttng-dev] [PATCH lttng-tools] Fix: memory leak in ust-app.c error path

Mathieu Desnoyers mathieu.desnoyers at efficios.com
Fri Jun 14 12:09:46 EDT 2013


Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
---
diff --git a/src/bin/lttng-sessiond/ust-app.c b/src/bin/lttng-sessiond/ust-app.c
index 12ea705..cd1876d 100644
--- a/src/bin/lttng-sessiond/ust-app.c
+++ b/src/bin/lttng-sessiond/ust-app.c
@@ -4689,6 +4689,9 @@ int ust_app_recv_notify(int sock)
 		ret = add_event_ust_registry(sock, sobjd, cobjd, name, sig, nr_fields,
 				fields, loglevel, model_emf_uri);
 		if (ret < 0) {
+			free(sig);
+			free(fields);
+			free(model_emf_uri);
 			goto error;
 		}
 

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com



More information about the lttng-dev mailing list