* src/find-mount-point.c (find_mount_point): Don't call ASSIGN_STRDUPA
on the result of dir_name.
else
/* FILE is some other kind of file; use its directory. */
{
- char *xdir = dir_name (file);
- char *dir;
- ASSIGN_STRDUPA (dir, xdir);
- free (xdir);
+ char *dir = dir_name (file);
if (chdir (dir) < 0)
{
error (0, errno, _("cannot change to directory %s"), quoteaf (dir));
+ free (dir);
return NULL;
}
{
error (0, errno, _("cannot stat current directory (now %s)"),
quoteaf (dir));
+ free (dir);
goto done;
}
+
+ free (dir);
}
/* Now walk up FILE's parents until we find another file system or /,