Commit e28bd9ff authored by Robert Schmidt's avatar Robert Schmidt

Free USRP objects in trx_usrp_end()

parent 0ae3d302
...@@ -318,11 +318,24 @@ static void trx_usrp_end(openair0_device *device) { ...@@ -318,11 +318,24 @@ static void trx_usrp_end(openair0_device *device) {
usrp_state_t *s = (usrp_state_t *)device->priv; usrp_state_t *s = (usrp_state_t *)device->priv;
if (s == NULL) AssertFatal(s != NULL, "%s() called on uninitialized USRP\n", __func__);
return;
iqrecorder_end(device); iqrecorder_end(device);
LOG_I(HW, "releasing USRP\n");
s->tx_stream->~tx_streamer();
s->rx_stream->~rx_streamer();
s->usrp->~multi_usrp();
free(s);
device->priv = NULL;
device->trx_start_func = NULL;
device->trx_get_stats_func = NULL;
device->trx_reset_stats_func = NULL;
device->trx_end_func = NULL;
device->trx_stop_func = NULL;
device->trx_set_freq_func = NULL;
device->trx_set_gains_func = NULL;
device->trx_write_init = NULL;
} }
/*! \brief Called to send samples to the USRP RF target /*! \brief Called to send samples to the USRP RF target
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment