aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_zap.c
diff options
context:
space:
mode:
authorqwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-11-01 16:22:09 +0000
committerqwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-11-01 16:22:09 +0000
commit29e524f0b8349a337008a3df97a9f2bb530c42e6 (patch)
tree5296d711d21584407a3056cd791fd92d4385cbff /channels/chan_zap.c
parent54e5e5a73e56bcc9e1282c692bbd9c8bec59f84b (diff)
Merged revisions 88078 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r88078 | qwell | 2007-11-01 11:21:22 -0500 (Thu, 01 Nov 2007) | 4 lines Make sure we set the poll fds to NULL after free()ing it. Part of issue 11017, patch by tzafrir. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@88079 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_zap.c')
-rw-r--r--channels/chan_zap.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/channels/chan_zap.c b/channels/chan_zap.c
index bdc786fa9..556cdc59c 100644
--- a/channels/chan_zap.c
+++ b/channels/chan_zap.c
@@ -7163,8 +7163,10 @@ static void *do_monitor(void *data)
/* Lock the interface list */
ast_mutex_lock(&iflock);
if (!pfds || (lastalloc != ifcount)) {
- if (pfds)
+ if (pfds) {
ast_free(pfds);
+ pfds = NULL;
+ }
if (ifcount) {
if (!(pfds = ast_calloc(1, ifcount * sizeof(*pfds)))) {
ast_mutex_unlock(&iflock);