From: Andrei Borzenkov Date: Fri, 19 Jun 2015 15:38:25 +0000 (+0300) Subject: unix/relpath: memory leak X-Git-Tag: 2.02-beta3~283 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=10a6d2d91562231d3b21fb0c64adf88805a6fbec;p=thirdparty%2Fgrub.git unix/relpath: memory leak Found by Coverity scan. CID: 96606 --- diff --git a/grub-core/osdep/unix/relpath.c b/grub-core/osdep/unix/relpath.c index 8fdc3a73a..f719950fd 100644 --- a/grub-core/osdep/unix/relpath.c +++ b/grub-core/osdep/unix/relpath.c @@ -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. */