Changeset f1a8c23 in mainline


Ignore:
Timestamp:
2014-06-29T22:11:05Z (10 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1bdf307d
Parents:
ef1ddad
Message:

Fix leak of inet dgram.data in TCP, should be freed by inet_ev_recv().

Location:
uspace
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/inet.c

    ref1ddad rf1a8c23  
    11/*
    2  * Copyright (c) 2012 Jiri Svoboda
     2 * Copyright (c) 2013 Jiri Svoboda
    33 * All rights reserved.
    44 *
     
    3434#include <ipc/services.h>
    3535#include <loc.h>
     36#include <stdlib.h>
    3637
    3738static void inet_cb_conn(ipc_callid_t iid, ipc_call_t *icall, void *arg);
     
    224225       
    225226        rc = inet_ev_ops->recv(&dgram);
     227        free(dgram.data);
    226228        async_answer_0(iid, rc);
    227229}
  • uspace/srv/net/udp/udp_inet.c

    ref1ddad rf1a8c23  
    7171
    7272        udp_received_pdu(pdu);
     73
     74        /* We don't want udp_pdu_delete() to free dgram->data */
     75        pdu->data = NULL;
    7376        udp_pdu_delete(pdu);
    7477
Note: See TracChangeset for help on using the changeset viewer.