/* * Deallocate packet ID, etc. */ static void deallocate_id(radclient_t *radclient) { if (!radclient || !radclient->request || (radclient->request->id < 0)) { return; } /* * One more unused RADIUS ID. */ fr_packet_list_id_free(pl, radclient->request); radclient->request->id = -1; /* * If we've already sent a packet, free up the old one, * and ensure that the next packet has a unique * authentication vector. */ if (radclient->request->data) { free(radclient->request->data); radclient->request->data = NULL; } if (radclient->reply) rad_free(&radclient->reply); }
/* * Deallocate packet ID, etc. */ static void deallocate_id(rc_request_t *request) { if (!request || !request->packet || (request->packet->id < 0)) { return; } /* * One more unused RADIUS ID. */ fr_packet_list_id_free(pl, request->packet, true); /* * If we've already sent a packet, free up the old one, * and ensure that the next packet has a unique * authentication vector. */ if (request->packet->data) TALLOC_FREE(request->packet->data); if (request->reply) rad_free(&request->reply); }