diff options
Diffstat (limited to 'channels/chan_dahdi.c')
-rw-r--r-- | channels/chan_dahdi.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c index b5609691e..6847cad56 100644 --- a/channels/chan_dahdi.c +++ b/channels/chan_dahdi.c @@ -3859,8 +3859,9 @@ static void destroy_dahdi_pvt(struct dahdi_pvt **pvt) ast_smdi_interface_unref(p->smdi_iface); if (p->mwi_event_sub) ast_event_unsubscribe(p->mwi_event_sub); - if (p->vars) + if (p->vars && iflist && !iflist->next) { ast_variables_destroy(p->vars); + } ast_mutex_destroy(&p->lock); dahdi_close_sub(p, SUB_REAL); if (p->owner) |