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
This commit is contained in:
Russell Bryant
2007-01-31 21:35:15 +00:00
parent 78587a8402
commit b233892198
15 changed files with 47 additions and 8 deletions

View File

@@ -6163,6 +6163,8 @@ static void spawn_dp_lookup(int callno, const char *context, const char *calledn
if (ast_pthread_create(&newthread, &attr, dp_lookup_thread, dpr)) {
ast_log(LOG_WARNING, "Unable to start lookup thread!\n");
}
pthread_attr_destroy(&attr);
}
struct iax_dual {
@@ -6237,8 +6239,11 @@ static int iax_park(struct ast_channel *chan1, struct ast_channel *chan2)
d->chan1 = chan1m;
d->chan2 = chan2m;
if (!ast_pthread_create_background(&th, &attr, iax_park_thread, d))
if (!ast_pthread_create_background(&th, &attr, iax_park_thread, d)) {
pthread_attr_destroy(&attr);
return 0;
}
pthread_attr_destroy(&attr);
free(d);
}
return -1;