Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset f1a8c23 in mainline


Ignore:
Timestamp:
2014-06-29T22:11:05Z (6 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master
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.