summaryrefslogtreecommitdiff
path: root/pbx
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 /pbx
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 'pbx')
-rw-r--r--pbx/pbx_dundi.c6
-rw-r--r--pbx/pbx_spool.c2
2 files changed, 8 insertions, 0 deletions
diff --git a/pbx/pbx_dundi.c b/pbx/pbx_dundi.c
index d2fcfb454..cd7e96937 100644
--- a/pbx/pbx_dundi.c
+++ b/pbx/pbx_dundi.c
@@ -790,8 +790,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));
@@ -1019,8 +1021,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));
@@ -1106,8 +1110,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 6325f92eb..e84ebaaf5 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;
}