mirror of
http://cgit.git.savannah.gnu.org/git/grub.git
synced 2026-04-28 06:33:17 +00:00
grub-probe: fix memory leak
Found by: Coverity scan. CID: 73783
This commit is contained in:
@@ -668,6 +668,13 @@ probe (const char *path, char **device_names, char delim)
|
||||
for (curdrive = drives_names; *curdrive; curdrive++)
|
||||
free (*curdrive);
|
||||
free (drives_names);
|
||||
|
||||
if (path != NULL)
|
||||
{
|
||||
for (curdev = device_names; *curdev; curdev++)
|
||||
free (*curdev);
|
||||
free (device_names);
|
||||
}
|
||||
}
|
||||
|
||||
static struct argp_option options[] = {
|
||||
|
||||
Reference in New Issue
Block a user