mirror of
https://github.com/asterisk/asterisk.git
synced 2026-06-17 13:09:57 +00:00
How many times can we free allocated memory? Many, obviously... ;-)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35160 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
+2
-2
@@ -12089,10 +12089,10 @@ static int sip_park(struct ast_channel *chan1, struct ast_channel *chan2, struct
|
||||
d->chan2 = transferer; /* Transferer */
|
||||
d->seqno = seqno;
|
||||
if (!ast_pthread_create(&th, NULL, sip_park_thread, d)) {
|
||||
free(d);
|
||||
free(d); /* We don't need it anymore. If thread is created, d will be free'd
|
||||
by sip_park_thread() */
|
||||
return 0;
|
||||
}
|
||||
free(d);
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user