X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=daemon%2Ffile.c;h=cd477e5e4db146cb618b5c81e2510e89cb2aa20c;hb=2361905686c62b4163232139c3d390acd2c07916;hp=aab7e93e935cd49f10a2d6a6703deb3e09fa308a;hpb=549bba81e739ab10d8013c9ca88ce70b0ddda8e4;p=libguestfs.git diff --git a/daemon/file.c b/daemon/file.c index aab7e93..cd477e5 100644 --- a/daemon/file.c +++ b/daemon/file.c @@ -97,18 +97,18 @@ do_cat (char *path) if (size >= alloc) { alloc += 8192; if (alloc > max) { - reply_with_error ("cat: %s: file is too large for message buffer", - path); - free (buf); - close (fd); - return NULL; + reply_with_error ("cat: %s: file is too large for message buffer", + path); + free (buf); + close (fd); + return NULL; } buf2 = realloc (buf, alloc); if (buf2 == NULL) { - reply_with_perror ("realloc"); - free (buf); - close (fd); - return NULL; + reply_with_perror ("realloc"); + free (buf); + close (fd); + return NULL; } buf = buf2; } @@ -392,7 +392,6 @@ do_file (char *path) int len; NEED_ROOT_OR_IS_DEVICE (path, NULL); - ABS_PATH (path, NULL); if (strncmp (path, "/dev/", 5) == 0) buf = (char *) path;