diff --git a/src/rxkad/rxkad_client.c b/src/rxkad/rxkad_client.c index 61d0d06bc1..4d351987b8 100644 --- a/src/rxkad/rxkad_client.c +++ b/src/rxkad/rxkad_client.c @@ -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);