mirror of
https://git.openafs.org/openafs.git
synced 2025-01-21 00:10:15 +00:00
more-memory-leak-fixes-20040418
Another memory leak plugged; thanks to Jeffrey Altman for noticing it.
This commit is contained in:
parent
6f22e163a5
commit
daa011af02
@ -190,14 +190,16 @@ rxkad_NewClientSecurityObject(rxkad_level level,
|
||||
tcp->level = level;
|
||||
code = fc_keysched(sessionkey, tcp->keysched);
|
||||
if (code) {
|
||||
rxi_Free(tsc, size);
|
||||
rxi_Free(tcp, sizeof(struct rxkad_cprivate));
|
||||
rxi_Free(tsc, sizeof(struct rx_securityClass));
|
||||
return 0; /* bad key */
|
||||
}
|
||||
memcpy((void *)tcp->ivec, (void *)sessionkey, sizeof(tcp->ivec));
|
||||
tcp->kvno = kvno; /* key version number */
|
||||
tcp->ticketLen = ticketLen; /* length of ticket */
|
||||
if (tcp->ticketLen > MAXKTCTICKETLEN) {
|
||||
rxi_Free(tsc, size);
|
||||
rxi_Free(tcp, sizeof(struct rxkad_cprivate));
|
||||
rxi_Free(tsc, sizeof(struct rx_securityClass));
|
||||
return 0; /* bad key */
|
||||
}
|
||||
memcpy(tcp->ticket, ticket, ticketLen);
|
||||
|
Loading…
Reference in New Issue
Block a user