diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-01-31 21:32:08 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-01-31 21:32:08 +0000 |
commit | 2575db2212e7d80f55f6804f83d63e9a1cf48798 (patch) | |
tree | e7f13c5a00659352f3f3249fa9149a50db6dbceb /pbx | |
parent | 30a7992b379e6488d2e53b324c25de8d92c3aaac (diff) |
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: http://svn.digium.com/svn/asterisk/branches/1.4@53046 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx')
-rw-r--r-- | pbx/pbx_dundi.c | 6 | ||||
-rw-r--r-- | pbx/pbx_spool.c | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/pbx/pbx_dundi.c b/pbx/pbx_dundi.c index 99295826e..007c65d13 100644 --- a/pbx/pbx_dundi.c +++ b/pbx/pbx_dundi.c @@ -783,8 +783,10 @@ static int dundi_answer_entity(struct dundi_transaction *trans, struct dundi_ies memset(&ied, 0, sizeof(ied)); dundi_ie_append_cause(&ied, DUNDI_IE_CAUSE, DUNDI_CAUSE_GENERAL, "Out of threads"); dundi_send(trans, DUNDI_COMMAND_EIDRESPONSE, 0, 1, &ied); + pthread_attr_destroy(&attr); return -1; } + pthread_attr_destroy(&attr); } else { ast_log(LOG_WARNING, "Out of memory!\n"); memset(&ied, 0, sizeof(ied)); @@ -1009,8 +1011,10 @@ static int dundi_prop_precache(struct dundi_transaction *trans, struct dundi_ies memset(&ied, 0, sizeof(ied)); dundi_ie_append_cause(&ied, DUNDI_IE_CAUSE, DUNDI_CAUSE_GENERAL, "Out of threads"); dundi_send(trans, DUNDI_COMMAND_PRECACHERP, 0, 1, &ied); + pthread_attr_destroy(&attr); return -1; } + pthread_attr_destroy(&attr); } else { ast_log(LOG_WARNING, "Out of memory!\n"); memset(&ied, 0, sizeof(ied)); @@ -1095,8 +1099,10 @@ static int dundi_answer_query(struct dundi_transaction *trans, struct dundi_ies memset(&ied, 0, sizeof(ied)); dundi_ie_append_cause(&ied, DUNDI_IE_CAUSE, DUNDI_CAUSE_GENERAL, "Out of threads"); dundi_send(trans, DUNDI_COMMAND_DPRESPONSE, 0, 1, &ied); + pthread_attr_destroy(&attr); return -1; } + pthread_attr_destroy(&attr); } else { ast_log(LOG_WARNING, "Out of memory!\n"); memset(&ied, 0, sizeof(ied)); diff --git a/pbx/pbx_spool.c b/pbx/pbx_spool.c index 2293ca9ab..4d6e955d8 100644 --- a/pbx/pbx_spool.c +++ b/pbx/pbx_spool.c @@ -367,6 +367,7 @@ static void launch_service(struct outgoing *o) ast_log(LOG_WARNING, "Unable to create thread :( (returned error: %d)\n", ret); free_outgoing(o); } + pthread_attr_destroy(&attr); } static int scan_service(char *fn, time_t now, time_t atime) @@ -499,6 +500,7 @@ static int load_module(void) ast_log(LOG_WARNING, "Unable to create thread :( (returned error: %d)\n", ret); return -1; } + pthread_attr_destroy(&attr); return 0; } |