diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-01-31 21:25:11 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-01-31 21:25:11 +0000 |
commit | 429708be61aa87849d22506b160268529e333966 (patch) | |
tree | c5e1072803ac13065b5b9f0d0e7e352f5cb1acf9 /pbx | |
parent | 0c01638a1711f8e63655a564971e18db13a904f1 (diff) |
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.2@53045 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 8f0457296..8b87c8ec9 100644 --- a/pbx/pbx_dundi.c +++ b/pbx/pbx_dundi.c @@ -799,8 +799,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)); @@ -1030,8 +1032,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)); @@ -1122,8 +1126,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 187beda1c..0fac2b1a9 100644 --- a/pbx/pbx_spool.c +++ b/pbx/pbx_spool.c @@ -295,6 +295,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) @@ -426,6 +427,7 @@ 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; } |