int recheck;
} regl;
+static void temp_pvt_cleanup(void *);
+
/*! \brief A per-thread temporary pvt structure */
-AST_THREADSTORAGE(ts_temp_pvt);
+AST_THREADSTORAGE_CUSTOM(ts_temp_pvt, NULL, temp_pvt_cleanup);
/*! \todo Move the sip_auth list to AST_LIST */
static struct sip_auth *authl = NULL; /*!< Authentication list for realm authentication */
return send_response(p, &resp, reliable, seqno);
}
+static void temp_pvt_cleanup(void *data)
+{
+ struct sip_pvt *p = data;
+
+ ast_string_field_free_pools(p);
+
+ free(data);
+}
+
/*! \brief Transmit response, no retransmits, using a temporary pvt structure */
static int transmit_response_using_temp(ast_string_field callid, struct sockaddr_in *sin, int useglobal_nat, const int intended_method, const struct sip_request *req, const char *msg)
{