mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
diff: Don't try to call unlink(NULL) on certain error paths.
Actual bug found by GCC analyzer.
This commit is contained in:
@@ -773,8 +773,8 @@ diff (struct file *file1, guestfs_h *g1, struct file *file2, guestfs_h *g2)
|
||||
printf ("@@ %s @@\n", _("End of diff"));
|
||||
|
||||
out:
|
||||
unlink (tmpda);
|
||||
unlink (tmpdb);
|
||||
if (tmpda) unlink (tmpda);
|
||||
if (tmpdb) unlink (tmpdb);
|
||||
rmdir (tmpd);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user