[Bug 278476] fd and memory leak in ls

From: <bugzilla-noreply_at_freebsd.org>
Date: Sat, 20 Apr 2024 16:42:19 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=278476

--- Comment #3 from Paul Floyd <pjfloyd@wanadoo.fr> ---
If you do want something with annotation you can do something like

#include <valgrind.h>

...

if (RUNNING_ON_VALGRIND)
{
   close(fd);
}

That adds a Valgrind dependency. It'd be a lot easier to just close the file
descriptor.

-- 
You are receiving this mail because:
You are the assignee for the bug.