[lttng-dev] [PATCH lttng-tools] Fix: lttng-relayd: unhandled out of memory error

Mathieu Desnoyers mathieu.desnoyers at efficios.com
Fri Nov 21 12:47:52 EST 2014


Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
---
 src/bin/lttng-relayd/main.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/bin/lttng-relayd/main.c b/src/bin/lttng-relayd/main.c
index c9f2021..27a428a 100644
--- a/src/bin/lttng-relayd/main.c
+++ b/src/bin/lttng-relayd/main.c
@@ -234,6 +234,11 @@ int set_option(int opt, const char *arg, const char *optname)
 		break;
 	case 'g':
 		tracing_group_name = strdup(arg);
+		if (tracing_group_name == NULL) {
+			ret = -errno;
+			PERROR("strdup");
+			goto end;
+		}
 		tracing_group_name_override = 1;
 		break;
 	case 'h':
-- 
2.1.1




More information about the lttng-dev mailing list