We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 25068a2 commit 50680b2Copy full SHA for 50680b2
src/sip.c
@@ -191,18 +191,16 @@ sip_call_create(char *callid)
191
void
192
sip_call_destroy(sip_call_t *call)
193
{
194
- sip_call_t *prev = NULL;
195
- sip_msg_t *msg = NULL;
196
-
197
// No call to destroy
198
if (!call) return;
199
200
- // Get previous message
201
- //for (msg = call->msgs; msg; msg = msg->next)
202
- // sip_msg_destroy(msg);
+ // Remove all messages
+ while(call->msgs)
+ sip_msg_destroy(call->msgs);
203
204
// Free it!
205
free(call);
+ call = NULL;
206
}
207
208
0 commit comments