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
1.4
Olle Johansson 20 years ago
parent b27fff2a9d
commit 12164df2fd

@ -12089,10 +12089,10 @@ static int sip_park(struct ast_channel *chan1, struct ast_channel *chan2, struct
d->chan2 = transferer; /* Transferer */ d->chan2 = transferer; /* Transferer */
d->seqno = seqno; d->seqno = seqno;
if (!ast_pthread_create(&th, NULL, sip_park_thread, d)) { 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; return 0;
} }
free(d);
} }
return -1; return -1;
} }

Loading…
Cancel
Save