diff options
author | cinap_lenrek <cinap_lenrek@centraldogma> | 2011-09-07 02:46:38 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@centraldogma> | 2011-09-07 02:46:38 +0200 |
commit | 42f37419b65199482a5d951bc6e451c558b3a10e (patch) | |
tree | f34b23edbb456d6ac8614229a91ceb753aec808f /sys/src/cmd/cwfs/auth.c | |
parent | cd3b567ea0629dea0f3f816af23774bc62c75bab (diff) |
cwfs: fix use after free bug (ai->cuid), remove waitedfor abort()
Diffstat (limited to 'sys/src/cmd/cwfs/auth.c')
-rw-r--r-- | sys/src/cmd/cwfs/auth.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/src/cmd/cwfs/auth.c b/sys/src/cmd/cwfs/auth.c index 5ca644ed3..e3d51be7e 100644 --- a/sys/src/cmd/cwfs/auth.c +++ b/sys/src/cmd/cwfs/auth.c @@ -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){ |