viced: fix GetVolumePackage to not bomb always when GetClient called
authorDerrick Brashear <shadow@dementix.org>
Mon, 11 Jun 2012 20:37:53 +0000 (16:37 -0400)
committerDerrick Brashear <shadow@dementix.org>
Mon, 11 Jun 2012 22:27:46 +0000 (15:27 -0700)
master only. already correct in 1.6. the gotos for error exit should
be called only when we have an error, due to missing braces that was
not true

Change-Id: I396be7d34ad741e01634a702784a0892f47a2d5a
Reviewed-on: http://gerrit.openafs.org/7549
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>

src/viced/afsfileprocs.c

index a3070f6..2bcab1b 100644 (file)
@@ -847,9 +847,10 @@ GetVolumePackageWithCall(struct rx_call *acall, struct VCallByVol *cbv,
        if (!(*client)) {
            if ((errorCode = GetClient(tcon, client)) != 0)
                goto gvpdone;
-           if (!(*client))
+           if (!(*client)) {
                errorCode = EINVAL;
                goto gvpdone;
+           }
        }
        GetRights(*client, aCL, rights, anyrights);
        /* ok, if this is not a dir, set the PRSFS_ADMINISTER bit iff we're the owner */