Skip to content
Snippets Groups Projects
Commit 12164df2 authored by Olle Johansson's avatar Olle Johansson
Browse files

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
parent b27fff2a
Branches
Tags
No related merge requests found
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment