]> git.lizzy.rs Git - plan9front.git/blobdiff - sys/src/cmd/cwfs/auth.c
merge
[plan9front.git] / sys / src / cmd / cwfs / auth.c
index 5ca644ed37b332b34c7aedeb845e624812447404..e3d51be7e383d4ff6d4d9959ac4509c76c0aac8f 100644 (file)
@@ -143,12 +143,13 @@ authread(File *file, uchar *data, int count)
                if((ai = auth_getinfo(rpc)) == nil)
                        goto Phase;
                file->uid = strtouid(ai->cuid);
-               auth_freeAI(ai);
                if(file->uid < 0){
                        snprint(chan->err, sizeof(chan->err),
                                "unknown user '%s'", ai->cuid);
+                       auth_freeAI(ai);
                        return -1;
                }
+               auth_freeAI(ai);
                return 0;
        case ARok:
                if(count < rpc->narg){