X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Flib%2Flttng-ctl%2Flttng-ctl.c;h=9e709c1b6e4157f9072838d3fdbc8f779ed63cda;hp=ff39b88416e4d4410cd5af453a6e92baf4226a10;hb=e848d36d1b0e7cbe1800e195fb00eaff6bce4d5e;hpb=4147107d9646011a1cdb7166a9810065927af99c 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;