From 5d0ee3d7a1a1381cb75111f2992d5d97b301894f Mon Sep 17 00:00:00 2001 From: Andrei Borzenkov Date: Fri, 19 Jun 2015 18:38:25 +0300 Subject: [PATCH] unix/getroot: memory leak Found by Coverity scan. CID: 96605 --- grub-core/osdep/unix/getroot.c | 1 + 1 file changed, 1 insertion(+) diff --git a/grub-core/osdep/unix/getroot.c b/grub-core/osdep/unix/getroot.c index b98b2dfb0..14d483fb1 100644 --- a/grub-core/osdep/unix/getroot.c +++ b/grub-core/osdep/unix/getroot.c @@ -544,6 +544,7 @@ grub_guess_root_devices (const char *dir_in) if (stat (dir, &st) < 0) grub_util_error (_("cannot stat `%s': %s"), dir, strerror (errno)); + free (dir); dev = st.st_dev;