]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
unix/getroot: memory leak
authorAndrei Borzenkov <arvidjaar@gmail.com>
Fri, 19 Jun 2015 15:38:25 +0000 (18:38 +0300)
committerAndrei Borzenkov <arvidjaar@gmail.com>
Fri, 19 Jun 2015 15:38:25 +0000 (18:38 +0300)
Found by Coverity scan.
CID: 96605

grub-core/osdep/unix/getroot.c

index b98b2dfb0eb920741ca6ce2ca5933ee348b8ba1e..14d483fb139fc119601052aa99df998eca766fdc 100644 (file)
@@ -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;