ref: 474bc6a14ae55f5b4def8dad3370d9f0a81a7d7e
parent: a7a56b9a480c9985587574c5fb06b156a051ae73
author: cinap_lenrek <cinap_lenrek@localhost>
date: Thu Jul 21 11:59:00 EDT 2011
cwfs: fix auth filedescriptor leak
--- a/sys/src/cmd/cwfs/auth.c
+++ b/sys/src/cmd/cwfs/auth.c
@@ -103,7 +103,7 @@
return nil;
}
if(auth_rpc(rpc, "start", keyspec, strlen(keyspec)) != ARok){
- auth_freerpc(rpc);
+ authfree(rpc);
return nil;
}
return rpc;
@@ -114,8 +114,10 @@
{
AuthRpc *rpc;
- if(rpc = auth)
+ if(rpc = auth){
+ close(rpc->afd);
auth_freerpc(rpc);
+ }
}
int