unix/getroot: memory leak

Found by Coverity scan.
CID: 96605
This commit is contained in:
Andrei Borzenkov 2015-06-19 18:38:25 +03:00
parent 10a6d2d915
commit 5d0ee3d7a1

View file

@ -544,6 +544,7 @@ grub_guess_root_devices (const char *dir_in)
if (stat (dir, &st) < 0) if (stat (dir, &st) < 0)
grub_util_error (_("cannot stat `%s': %s"), dir, strerror (errno)); grub_util_error (_("cannot stat `%s': %s"), dir, strerror (errno));
free (dir);
dev = st.st_dev; dev = st.st_dev;