From db7c0497a78cd7a5e8a5f5858efe0a5462337507 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Fri, 1 Jun 2012 17:01:13 -0400 Subject: [PATCH] Fix: ust_app_list_events should return -ENOSYS when no UST Caller thinks that memory is allocated, and incorrectly dereferences a NULL pointer if we return 0 rather than -ENOSYS. Signed-off-by: Mathieu Desnoyers --- src/bin/lttng-sessiond/ust-app.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/lttng-sessiond/ust-app.h b/src/bin/lttng-sessiond/ust-app.h index 88539879a..5d8485f3b 100644 --- a/src/bin/lttng-sessiond/ust-app.h +++ b/src/bin/lttng-sessiond/ust-app.h @@ -202,7 +202,7 @@ int ust_app_stop_trace_all(struct ltt_ust_session *usess) static inline int ust_app_list_events(struct lttng_event **events) { - return 0; + return -ENOSYS; } static inline int ust_app_register(struct ust_register_msg *msg, int sock) -- 2.34.1