From ca4443a76e1895fb65876cf9d6312ea36fd3d467 Mon Sep 17 00:00:00 2001 From: Peter Kallden Date: Mon, 23 Feb 2004 12:07:30 +0000 Subject: [PATCH] linklist memfree bugfix - volker milde git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@613 423420c4-83ab-492f-b58f-81f9feb106b5 --- rdpdr.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/rdpdr.c b/rdpdr.c index 60028c8..47ee614 100644 --- a/rdpdr.c +++ b/rdpdr.c @@ -824,12 +824,14 @@ rdpdr_check_fds(fd_set * rfds, fd_set * wfds, BOOL timed_out) { prev->next = iorq->next; xfree(iorq); + iorq = prev->next; } else { // Even if NULL g_iorequest = iorq->next; xfree(iorq); + iorq = NULL; } } } @@ -877,12 +879,14 @@ rdpdr_check_fds(fd_set * rfds, fd_set * wfds, BOOL timed_out) { prev->next = iorq->next; xfree(iorq); + iorq = prev->next; } else { // Even if NULL g_iorequest = iorq->next; xfree(iorq); + iorq = NULL; } } } @@ -891,7 +895,8 @@ rdpdr_check_fds(fd_set * rfds, fd_set * wfds, BOOL timed_out) } prev = iorq; - iorq = iorq->next; + if (iorq) + iorq = iorq->next; } }