<div dir="auto">Hello,<br><br>This patch improves the clarity of a FIXME comment in "input_GetItem".<br><br>The updated comment better explains that the function does not increase the reference count of the returned item, and highlights the potential risk of use-after-free if the item is accessed after the input thread is destroyed.<br><br>This makes the behavior clearer and helps future contributors understand the associated risks.<br><br>Thanks,<br>Manjeet Yaduvanshi<br><pre style="text-wrap-mode: wrap;">From 82f5cfce685aaf1be0325fbba3d8aaf6fcac63ff Mon Sep 17 00:00:00 2001
From: Manjeet Yaduvanshi <<a href="mailto:manjeetyaduvanshi250@gmail.com">manjeetyaduvanshi250@gmail.com</a>>
Date: Fri, 3 Apr 2026 23:45:17 +0530
Subject: [PATCH] input: improve FIXME comment for reference handling
---
src/input/input.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/input/input.c b/src/input/input.c
index 6cd40c5fb7..ba7584f81d 100644
--- a/src/input/input.c
+++ b/src/input/input.c
@@ -196,9 +196,9 @@ void input_SetPosition( input_thread_t *p_input, double f_position, bool b_fast
/**
* Get the item from an input thread
- * FIXME it does not increase ref count of the item.
- * if it is used after p_input is destroyed nothing prevent it from
- * being freed.
+ * FIXME: This function does not increase the reference count of the item.
+ * If it is used after p_input is destroyed, the item may be freed,
+ * leading to potential use-after-free issues.
*/
input_item_t *input_GetItem( input_thread_t *p_input )
{
--
2.53.0.windows.1
</pre><br></div>