Thanks to visit codestin.com
Credit goes to github.com

Skip to content

memory leak ??!! #8

@kevin-gjm

Description

@kevin-gjm

I cant find the free point??
malloc in __peer_alloc_cb. Where to free it,I can not find it. in __peer_read_cb ???

e = uv_read_start((uv_stream_t*)tcp, __peer_alloc_cb, __peer_read_cb);

calloc in __connect_to_peer but not find free point. free in __delete_connection ??

static void __connect_to_peer(peer_connection_t* conn)
{
    uv_tcp_t *tcp = calloc(1, sizeof(uv_tcp_t));

    conn->stream = (uv_stream_t*)tcp;
    conn->connection_status = CONNECTING;
    uv_connect_t *c = calloc(1, sizeof(uv_connect_t));
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions