diff options
author | jpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-09-15 16:29:27 +0000 |
---|---|---|
committer | jpeeler <jpeeler@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-09-15 16:29:27 +0000 |
commit | 45045de1837b213ce9584d17b22a789bca7a8cbb (patch) | |
tree | 43cfb027b92b1db56d0c5b65dcea889cf56ebacd /channels/chan_dahdi.c | |
parent | 66aed6183f0e3c23ece0382d25c85ca5e611f1ca (diff) |
Fix small memory leak in handle_init_event by always destroying the pthread
attr before returning.
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@218623 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_dahdi.c')
-rw-r--r-- | channels/chan_dahdi.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c index 47d39d819..f3a27d345 100644 --- a/channels/chan_dahdi.c +++ b/channels/chan_dahdi.c @@ -7146,6 +7146,7 @@ static struct dahdi_pvt *handle_init_event(struct dahdi_pvt *i, int event) res = tone_zone_play_tone(i->subs[SUB_REAL].dfd, DAHDI_TONE_CONGESTION); if (res < 0) ast_log(LOG_WARNING, "Unable to play congestion tone on channel %d\n", i->channel); + pthread_attr_destroy(&attr); return NULL; } break; @@ -7212,6 +7213,7 @@ static struct dahdi_pvt *handle_init_event(struct dahdi_pvt *i, int event) default: ast_log(LOG_WARNING, "Don't know how to handle on hook with signalling %s on channel %d\n", sig2str(i->sig), i->channel); res = tone_zone_play_tone(i->subs[SUB_REAL].dfd, -1); + pthread_attr_destroy(&attr); return NULL; } break; @@ -7248,6 +7250,7 @@ static struct dahdi_pvt *handle_init_event(struct dahdi_pvt *i, int event) ast_log(LOG_NOTICE, "Got DAHDI_EVENT_REMOVED. Destroying channel %d\n", i->channel); + pthread_attr_destroy(&attr); return i; } pthread_attr_destroy(&attr); |