mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-10 21:10:06 -04:00
Now that event_assign() special-cases event_self_cbarg(), event_new() can stop
This commit is contained in:
parent
1da0e04a0a
commit
33e42ef3d3
2
event.c
2
event.c
@ -1927,8 +1927,6 @@ event_new(struct event_base *base, evutil_socket_t fd, short events, void (*cb)(
|
|||||||
ev = mm_malloc(sizeof(struct event));
|
ev = mm_malloc(sizeof(struct event));
|
||||||
if (ev == NULL)
|
if (ev == NULL)
|
||||||
return (NULL);
|
return (NULL);
|
||||||
if (arg == &event_self_cbarg_ptr_)
|
|
||||||
arg = ev;
|
|
||||||
if (event_assign(ev, base, fd, events, cb, arg) < 0) {
|
if (event_assign(ev, base, fd, events, cb, arg) < 0) {
|
||||||
mm_free(ev);
|
mm_free(ev);
|
||||||
return (NULL);
|
return (NULL);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user