diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-01-31 21:35:15 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-01-31 21:35:15 +0000 |
commit | ee25f98f931c43f4b818ea3596addb56cabd90bf (patch) | |
tree | 0e35f242520b94fd9a1d5133efb637aefa1ae210 /main | |
parent | 85d841f1399b7e7c0b20c2d4465059a6dd3eb9f1 (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: http://svn.digium.com/svn/asterisk/trunk@53047 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main')
-rw-r--r-- | main/cdr.c | 1 | ||||
-rw-r--r-- | main/http.c | 2 | ||||
-rw-r--r-- | main/manager.c | 1 | ||||
-rw-r--r-- | main/pbx.c | 7 |
4 files changed, 11 insertions, 0 deletions
diff --git a/main/cdr.c b/main/cdr.c index e8eebe10f..33f326b86 100644 --- a/main/cdr.c +++ b/main/cdr.c @@ -861,6 +861,7 @@ void ast_cdr_submit_batch(int shutdown) if (option_debug) ast_log(LOG_DEBUG, "CDR multi-threaded batch processing begins now\n"); } + pthread_attr_destroy(&attr); } } diff --git a/main/http.c b/main/http.c index 30c4e930e..3d0b7f703 100644 --- a/main/http.c +++ b/main/http.c @@ -684,6 +684,8 @@ void *server_root(void *data) close(ser->fd); free(ser); } + + pthread_attr_destroy(&attr); } return NULL; } diff --git a/main/manager.c b/main/manager.c index b84cd9ba5..4a63b6764 100644 --- a/main/manager.c +++ b/main/manager.c @@ -1841,6 +1841,7 @@ static int action_originate(struct mansession *s, const struct message *m) } else { res = 0; } + pthread_attr_destroy(&attr); } } else if (!ast_strlen_zero(app)) { res = ast_pbx_outgoing_app(tech, AST_FORMAT_SLINEAR, data, to, app, appdata, &reason, 1, l, n, vars, account, NULL); 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: |