summaryrefslogtreecommitdiff
path: root/main/pbx.c
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2007-01-31 21:35:15 +0000
committerRussell Bryant <russell@russellbryant.com>2007-01-31 21:35:15 +0000
commitb23389219855875161ca52097fae81f404e8a14f (patch)
tree0e35f242520b94fd9a1d5133efb637aefa1ae210 /main/pbx.c
parent78587a84029657ac76298efbce4594e8790f7c52 (diff)
Merged revisions 53046 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r53046 | russell | 2007-01-31 15:32:08 -0600 (Wed, 31 Jan 2007) | 11 lines Merged revisions 53045 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r53045 | russell | 2007-01-31 15:25:11 -0600 (Wed, 31 Jan 2007) | 3 lines Fix a bunch of places where pthread_attr_init() was called, but pthread_attr_destroy() was not. ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@53047 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/pbx.c')
-rw-r--r--main/pbx.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/main/pbx.c b/main/pbx.c
index a3a0ebe37..f60b2b2bd 100644
--- a/main/pbx.c
+++ b/main/pbx.c
@@ -2506,8 +2506,10 @@ enum ast_pbx_result ast_pbx_start(struct ast_channel *c)
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
if (ast_pthread_create(&t, &attr, pbx_thread, c)) {
ast_log(LOG_WARNING, "Failed to create new channel thread\n");
+ pthread_attr_destroy(&attr);
return AST_PBX_FAILED;
}
+ pthread_attr_destroy(&attr);
return AST_PBX_SUCCESS;
}
@@ -5015,8 +5017,10 @@ int ast_pbx_outgoing_exten(const char *type, int format, void *data, int timeout
}
ast_hangup(chan);
res = -1;
+ pthread_attr_destroy(&attr);
goto outgoing_exten_cleanup;
}
+ pthread_attr_destroy(&attr);
res = 0;
}
outgoing_exten_cleanup:
@@ -5118,6 +5122,7 @@ int ast_pbx_outgoing_app(const char *type, int format, void *data, int timeout,
if (locked_channel)
*locked_channel = chan;
}
+ pthread_attr_destroy(&attr);
}
}
} else {
@@ -5176,11 +5181,13 @@ int ast_pbx_outgoing_app(const char *type, int format, void *data, int timeout,
ast_channel_unlock(chan);
ast_hangup(chan);
res = -1;
+ pthread_attr_destroy(&attr);
goto outgoing_app_cleanup;
} else {
if (locked_channel)
*locked_channel = chan;
}
+ pthread_attr_destroy(&attr);
res = 0;
}
outgoing_app_cleanup: