rpc.gssd: Two resource leaks
Subsystems (2)
cover rpc.gssd: Two resource leaks
From: Thiago Becker <[email protected]>
Patch 1 drops a reference to clnt_info when alloc_upcall_info fails. Patch 2 frees the thread attributes before returning from start_upcall_thread.
Both leaks were identified by claude sonnet 4.5, among some amount of false positives that were hand filtered.
Thiago Becker (2):
rpc.gssd: Decrement client referece count on error paths rpc.gssd: Call pthread_attr_destroy before returning from
start_upcall_thread
utils/gssd/gssd_proc.c | 4 ++++ 1 file changed, 4 insertions(+)
Signature · 1 line
2.54.0
PATCH 1/2 rpc.gssd: Decrement client referece count on error paths
From: Thiago Becker <[email protected]>
--- utils/gssd/gssd_proc.c | 3 +++ 1 file changed, 3 insertions(+)
utils/gssd/gssd_proc.c +3 -0
@@ -897,6 +897,9 @@ out_srchost:if (info->srchost)free (info->srchost); out_info: +pthread_mutex_lock (&clp_lock); + clp->refcount--; +pthread_mutex_unlock (&clp_lock);free (info); info =NULL ; goto out;
Signature · 1 line
2.54.0
PATCH 2/2 rpc.gssd: Call pthread_attr_destroy before returning from start_upcall_thread
In reply to [email protected]From: Thiago Becker <[email protected]>
--- utils/gssd/gssd_proc.c | 1 + 1 file changed, 1 insertion(+)
utils/gssd/gssd_proc.c +1 -0
@@ -984,6 +984,7 @@ start_upcall_thread(void (*func)(struct clnt_upcall_info *), struct clnt_upcall_ tinfo->timeout.tv_sec += upcall_timeout;TAILQ_INSERT_TAIL (&active_thread_list, tinfo, list);pthread_mutex_unlock (&active_thread_list_lock); +pthread_attr_destroy (&attr);return ret; }
Signature · 1 line
2.54.0
Quoted 9 lines · On 7/3/26 12:39 PM, [email protected] wrote:
From: Thiago Becker <[email protected]>
Patch 1 drops a reference to
clnt_infowhenalloc_upcall_infofails. Patch 2 frees the thread attributes before returning fromstart_upcall_thread.Both leaks were identified by claude sonnet 4.5, among some amount of false positives that were hand filtered.
Quoted 8 lines
Thiago Becker (2):
rpc.gssd: Decrement client referece count on error paths rpc.gssd: Callpthread_attr_destroybefore returning from
start_upcall_threadutils/gssd/gssd_proc.c | 4 ++++ 1 file changed, 4 insertions(+)
Committed... (tag: nfs-utils-2-9-2-rc5)
steved.