Skip to content

hiredis/adapters/libevent.h memleak #618

Closed
@postren

Description

@postren

Hi,
in function redisLibeventAttach
/* Initialize and install read/write events */ e->rev = event_new(base, c->fd, EV_READ, redisLibeventReadEvent, e); e->wev = event_new(base, c->fd, EV_WRITE, redisLibeventWriteEvent, e);

here event_new will memleak

please update as flollow:

    redisLibeventEvents *e = (redisLibeventEvents*)privdata;
    event_del(e->rev);
    event_del(e->wev);
    event_free(e->rev);
    event_free(e->wev);
    free(e);
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions