]> git.lttng.org Git - lttng-modules.git/commitdiff
fix: add missing check for __must_check 'lttng_file_ref_put()' (v6.13)
authorMichael Jeanson <mjeanson@efficios.com>
Mon, 16 Dec 2024 20:02:23 +0000 (15:02 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 20 Jan 2025 19:33:54 +0000 (14:33 -0500)
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 <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
src/lttng-events.c

index 648a6605e81eb08654b933c1e84c0a2e4efcc929..ddd822728b28910a445df26726ed70ae02e36a4f 100644 (file)
@@ -2074,7 +2074,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:
This page took 0.032075 seconds and 4 git commands to generate.