From: Michael Jeanson Date: Wed, 22 Jan 2025 15:10:53 +0000 (+0000) Subject: fix: add missing check for __must_check 'lttng_file_ref_put()' (v6.13) X-Git-Tag: v2.13.17~2 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=6c94fa2842063bbdff73f453577d081e48036db0;p=lttng-modules.git fix: add missing check for __must_check 'lttng_file_ref_put()' (v6.13) Add a missing return code check to a call to 'lttng_file_ref_put()' which is marked as 'must_check', otherwise it results in a build failure when using -Werror. Change-Id: Ib50ec669ffc0fe87a367b25b788518d148f7a85e Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers --- diff --git a/src/lttng-events.c b/src/lttng-events.c index a3ffd1e4..5d52d294 100644 --- a/src/lttng-events.c +++ b/src/lttng-events.c @@ -1965,7 +1965,9 @@ int lttng_session_list_tracker_ids(struct lttng_kernel_session *session, return file_fd; open_error: - lttng_file_ref_put(session->priv->file); + if (!lttng_file_ref_put(session->priv->file)) { + /* Don't change return code */ + } refcount_error: fput(tracker_ids_list_file); file_error: