X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=src%2Flib%2Flttng-ctl%2Flttng-ctl.c;h=79b885467e27d4f258e44823231ae3da7a56fd2c;hb=607d6ef9b5f7c57e72a1b4bfeb0ba7ff9fb4e613;hp=561b0bcfba4e39a76eee320968985d8f09a18ef5;hpb=3db6ba399d017418a91045284743fe5d55716d4a;p=lttng-tools.git diff --git a/src/lib/lttng-ctl/lttng-ctl.c b/src/lib/lttng-ctl/lttng-ctl.c index 561b0bcfb..79b885467 100644 --- a/src/lib/lttng-ctl/lttng-ctl.c +++ b/src/lib/lttng-ctl/lttng-ctl.c @@ -2447,6 +2447,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;