aboutsummaryrefslogtreecommitdiffstats
path: root/main/pbx.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-01-31 21:32:08 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-01-31 21:32:08 +0000
commit2575db2212e7d80f55f6804f83d63e9a1cf48798 (patch)
treee7f13c5a00659352f3f3249fa9149a50db6dbceb /main/pbx.c
parent30a7992b379e6488d2e53b324c25de8d92c3aaac (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 '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 41ad2312d..230b06b9f 100644
--- a/main/pbx.c
+++ b/main/pbx.c
@@ -2585,8 +2585,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;
}
@@ -5048,8 +5050,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:
@@ -5151,6 +5155,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 {
@@ -5209,11 +5214,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: