talloc_free(request);
goto unknown;
}
+ (void) talloc_steal(request, request->packet);
request->reply = rad_alloc_reply(request, request->packet);
if (!request->reply) {
talloc_free(request);
* Allocate a packet for partial reads.
*/
if (!sock->packet) {
- sock->packet = rad_alloc(sock, 0);
+ sock->packet = rad_alloc(sock, false);
if (!sock->packet) return 0;
sock->packet->sockfd = listener->fd;
}
-static int listener_free(void *ctx)
+static int _listener_free(rad_listen_t *this)
{
- rad_listen_t *this;
-
- this = talloc_get_type_abort(ctx, rad_listen_t);
-
/*
* Other code may have eaten the FD.
*/
this->encode = master_listen[this->type].encode;
this->decode = master_listen[this->type].decode;
- talloc_set_destructor((void *) this, listener_free);
+ talloc_set_destructor(this, _listener_free);
this->data = talloc_zero_array(this, uint8_t, master_listen[this->type].inst_size);