X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=support%2Fmisc%2Fmountpoint.c;h=a72fb92adf046cea2fd6acceb2a33df45521570f;hp=2cf1324fb17a9674109221fd49dde2643f65577a;hb=fe34ff0312c7c22554087ecd78bbbeadb38ce195;hpb=2e075a16da4963f54cd556403ca9e15a68de27fd diff --git a/support/misc/mountpoint.c b/support/misc/mountpoint.c index 2cf1324..a72fb92 100644 --- a/support/misc/mountpoint.c +++ b/support/misc/mountpoint.c @@ -4,7 +4,7 @@ */ #include -#include +#include "xcommon.h" #include int @@ -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)