osdep/unix/getroot: Clean up redundant code

In grub-core/osdep/unix/getroot.c, Coverity spotted redundant code where the
double pointer os_dev was being set to 0 and then being overwritten later
without being used. Since this is unnecessary, we can remove the code that
sets os_dev to 0.

Fixes: CID 428875

Signed-off-by: Alec Brown <alec.r.brown@oracle.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
Alec Brown 2024-01-20 02:52:50 +00:00 committed by Daniel Kiper
parent c8bf758757
commit db0d19dc5f

View File

@ -540,7 +540,6 @@ grub_guess_root_devices (const char *dir_in)
for (cur = os_dev; *cur; cur++)
free (*cur);
free (os_dev);
os_dev = 0;
}
if (stat (dir, &st) < 0)