unix/relpath: memory leak

Found by Coverity scan.
CID: 96606
This commit is contained in:
Andrei Borzenkov 2015-06-19 18:38:25 +03:00
parent 48cd9dc104
commit 10a6d2d915
1 changed files with 4 additions and 1 deletions

View File

@ -51,7 +51,10 @@ grub_make_system_path_relative_to_its_root (const char *path)
#ifdef __linux__
ret = grub_make_system_path_relative_to_its_root_os (p);
if (ret)
return ret;
{
free (p);
return ret;
}
#endif
/* For ZFS sub-pool filesystems. */