fix memory leak when originate from manager cannot create a thread

(closes issue #13069)
Reported by: gknispel_proformatique
Patches:
      asterisk_trunk_action_originate.patch uploaded by gknispel (license 261)
	  Tested by: gknispel_proformatique, mvanbaak


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@130573 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Michiel van Baak
2008-07-13 22:48:51 +00:00
parent 95c8fc64bc
commit b47deb444c

View File

@@ -1920,6 +1920,7 @@ static int action_originate(struct mansession *s, const struct message *m)
pthread_attr_init(&attr);
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
if (ast_pthread_create(&th, &attr, fast_originate, fast)) {
ast_free(fast);
res = -1;
} else {
res = 0;