cwfs: fix auth filedescriptor leak

This commit is contained in:
cinap_lenrek 2011-07-21 15:59:00 +02:00
parent a7a56b9a48
commit 474bc6a14a

View file

@ -103,7 +103,7 @@ authnew(void)
return nil; return nil;
} }
if(auth_rpc(rpc, "start", keyspec, strlen(keyspec)) != ARok){ if(auth_rpc(rpc, "start", keyspec, strlen(keyspec)) != ARok){
auth_freerpc(rpc); authfree(rpc);
return nil; return nil;
} }
return rpc; return rpc;
@ -114,8 +114,10 @@ authfree(void *auth)
{ {
AuthRpc *rpc; AuthRpc *rpc;
if(rpc = auth) if(rpc = auth){
close(rpc->afd);
auth_freerpc(rpc); auth_freerpc(rpc);
}
} }
int int