Fix list traversal and element freeing

This commit is contained in:
Jeremy Lakeman 2014-05-09 15:08:00 +09:30
parent bb39bb871a
commit 796eb6268c

View File

@ -189,7 +189,7 @@ static int remote_hangup(char *UNUSED(cmd), int UNUSED(argc), char **argv, unsig
printf("Call ended\n");
fflush(stdout);
struct call *p=*call;
call = &p->_next;
*call = p->_next;
free(p);
}else{
call = &(*call)->_next;