lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] tcp_receive bugfix - incoming segment is larger than the ol


From: Oleg Tychev
Subject: [lwip-users] tcp_receive bugfix - incoming segment is larger than the old segment.
Date: Tue, 30 Jan 2007 17:01:26 +0100
User-agent: Thunderbird 1.5.0.9 (Windows/20061207)

Hello, All!

I see on this code fragment in function tcp_receive
             if (inseg.len > next->len) {
               /* The incoming segment is larger than the old
                  segment. We replace the old segment with the new
                  one. */
               cseg = tcp_seg_copy(&inseg);
               if (cseg != NULL) {
                 cseg->next = next->next;
                 if (prev != NULL) {
                   prev->next = cseg;
                 } else {
                   pcb->ooseq = cseg;
                 }
               }
               break;
             } else {
and think it should have free function for "next"

             if (inseg.len > next->len) {
               /* The incoming segment is larger than the old
                  segment. We replace the old segment with the new
                  one. */
               cseg = tcp_seg_copy(&inseg);
               if (cseg != NULL) {
                 cseg->next = next->next;
                 tcp_seg_free(next);
                 if (prev != NULL) {
                   prev->next = cseg;
                 } else {
                   pcb->ooseq = cseg;
                 }
               }
               break;
             } else {

Poka poka
-------------
Oleg Tychev






reply via email to

[Prev in Thread] Current Thread [Next in Thread]