On Fri, Apr 18, 2025 at 08:19:47PM +0300, ant.v.morya...@gmail.com wrote:

> From: Maks Mishin <maks.mishi...@gmail.com>
> 
> Fixes potential memory and file descriptor leaks in the read_full_file()
> function. If malloc succeeds but read() fails, the buffer was not freed,
> and the file descriptor was not closed. This patch ensures both resources
> are properly released using a common exit point.
> 
> Signed-off-by: Maks Mishin <maks.mishi...@gmail.com>
> Signed-off-by: Anton Moryakov <ant.v.morya...@gmail.com>
> ---
>  tools/zynqmpbif.c | 14 +++++++++-----
>  1 file changed, 9 insertions(+), 5 deletions(-)

Please note that this patch is malformed:
patch: **** malformed patch at line 125: @@ -214,24 +215,29 @@ static char 
*read_full_file(const char *filename, size_t *size)
as it looks like you're hand-editing the patches.

-- 
Tom

Attachment: signature.asc
Description: PGP signature

Reply via email to