X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=src%2Flib%2Flttng-ctl%2Flttng-ctl.c;h=9e709c1b6e4157f9072838d3fdbc8f779ed63cda;hb=203cfe5aea942eadb44ff772e158c39bc7c40eff;hp=ff39b88416e4d4410cd5af453a6e92baf4226a10;hpb=94a74983e5e660eef7678f5a18d3181d0e511a75;p=lttng-tools.git diff --git a/src/lib/lttng-ctl/lttng-ctl.c b/src/lib/lttng-ctl/lttng-ctl.c index ff39b8841..9e709c1b6 100644 --- a/src/lib/lttng-ctl/lttng-ctl.c +++ b/src/lib/lttng-ctl/lttng-ctl.c @@ -2857,6 +2857,10 @@ int lttng_data_pending(const char *session_name) /* Unexpected payload size */ ret = -LTTNG_ERR_INVALID; goto end; + } else if (!pending) { + /* Internal error. */ + ret = -LTTNG_ERR_UNK; + goto end; } ret = (int) *pending;