From 1f9ea73ccce16c5bc7e4eeb27db21b7bf62c9823 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Thu, 31 May 2012 16:13:08 -0400 Subject: [PATCH] Fix list field: handle error Signed-off-by: Mathieu Desnoyers --- liblttng-ust-ctl/ustctl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/liblttng-ust-ctl/ustctl.c b/liblttng-ust-ctl/ustctl.c index b0b5b6cc..9789413f 100644 --- a/liblttng-ust-ctl/ustctl.c +++ b/liblttng-ust-ctl/ustctl.c @@ -520,6 +520,10 @@ int ustctl_tracepoint_field_list_get(int sock, int tp_field_list_handle, ret = ustcomm_send_app_cmd(sock, &lum, &lur); if (ret) return ret; + if (lur.ret_code != USTCOMM_OK) { + DBG("Return code: %s", ustcomm_get_readable_code(lur.ret_code)); + return -EINVAL; + } len = ustcomm_recv_unix_sock(sock, iter, sizeof(*iter)); if (len != sizeof(*iter)) { return -EINVAL; -- 2.34.1