From 5ed08c31b658d8f878dd9f829c642c88f05496d5 Mon Sep 17 00:00:00 2001 From: Alexandre Bruyelles Date: Fri, 17 Nov 2023 01:07:00 +0100 Subject: [PATCH] fiemap: do_fiemap: fix a potential memleak Signed-off-by: Alexandre Bruyelles --- fiemap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fiemap.c b/fiemap.c index 3d90b6a622fd..aa61114431bd 100644 --- a/fiemap.c +++ b/fiemap.c @@ -88,6 +88,7 @@ struct fiemap *do_fiemap(int fd) err = ioctl(fd, FS_IOC_FIEMAP, fiemap); if (err < 0) { perror("fiemap"); + free(fiemap); return NULL; }