X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=support%2Fmisc%2Fmountpoint.c;h=750b6e81a602928e7a34404cb0d6cce775542c28;hp=2cf1324fb17a9674109221fd49dde2643f65577a;hb=0523fd513c6baa8dbf45d1a7afea2044262aeb3d;hpb=2e075a16da4963f54cd556403ca9e15a68de27fd diff --git a/support/misc/mountpoint.c b/support/misc/mountpoint.c index 2cf1324..750b6e8 100644 --- a/support/misc/mountpoint.c +++ b/support/misc/mountpoint.c @@ -22,9 +22,8 @@ is_mountpoint(char *path) struct stat stb, pstb; int rv; - dotdot = malloc(strlen(path)+4); - if (!dotdot) - return 0; + dotdot = xmalloc(strlen(path)+4); + strcat(strcpy(dotdot, path), "/.."); if (lstat(path, &stb) != 0 || lstat(dotdot, &pstb) != 0)