From: Mathieu Desnoyers Date: Fri, 1 Jun 2012 21:01:13 +0000 (-0400) Subject: Fix: ust_app_list_events should return -ENOSYS when no UST X-Git-Tag: v2.1.0-rc1~119 X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=commitdiff_plain;h=db7c0497a78cd7a5e8a5f5858efe0a5462337507 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 --- 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)