Re: [PATCH][next] scripts/sorttable: Fix resource leak on file pointer fp

From: Dan Carpenter
Date: Thu Feb 27 2025 - 04:59:29 EST


On Wed, Feb 26, 2025 at 10:49:34PM +0000, Colin Ian King wrote:
> There is a resource leak on fp on an error return path in function
> parse_symbols that causes a resource leak. Fix this by adding in
> the missing fclose.
>
> Fixes: ef378c3b8233 ("scripts/sorttable: Zero out weak functions in mcount_loc table")
> Signed-off-by: Colin Ian King <colin.i.king@xxxxxxxxx>

This is in scripts/ so it doesn't really matter. We're going to exit
and release everything immediately either way.

regards,
dan carpenter