Changeset 3106054 in mainline


Ignore:
Timestamp:
2019-10-08T00:30:29Z (5 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
cf9a1e2
Parents:
0a201454
Message:

Do not use segment after freeing in TCP server's tqueue tests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/tcp/test/tqueue.c

    r0a201454 r3106054  
    3232
    3333#include "../conn.h"
     34#include "../segment.h"
    3435#include "../tqueue.h"
    3536
     
    117118        PCUT_ASSERT_EQUALS(CTL_SYN, trans_seg[0]->ctrl);
    118119        PCUT_ASSERT_EQUALS(10, trans_seg[0]->seq);
     120        tcp_segment_delete(trans_seg[0]);
    119121}
    120122
     
    156158        PCUT_ASSERT_EQUALS(CTL_FIN | CTL_ACK, trans_seg[0]->ctrl);
    157159        PCUT_ASSERT_EQUALS(10, trans_seg[0]->seq);
     160        tcp_segment_delete(trans_seg[0]);
    158161}
    159162
     
    198201        PCUT_ASSERT_EQUALS(CTL_ACK, trans_seg[0]->ctrl);
    199202        PCUT_ASSERT_EQUALS(10, trans_seg[0]->seq);
     203        tcp_segment_delete(trans_seg[0]);
    200204}
    201205
     
    256260static void tqueue_test_transmit_seg(inet_ep2_t *epp, tcp_segment_t *seg)
    257261{
    258         trans_seg[seg_cnt++] = seg;
     262        trans_seg[seg_cnt++] = tcp_segment_dup(seg);
    259263}
    260264
Note: See TracChangeset for help on using the changeset viewer.