uNetworking / uSockets

Miniscule cross-platform eventing, networking & crypto for async applications
Apache License 2.0
1.29k stars 267 forks source link

Memory leak in us_create_timer #211

Open abrownsword opened 1 year ago

abrownsword commented 1 year ago
struct us_poll_t *p = us_create_poll(loop, fallthrough, sizeof(struct us_internal_callback_t) + ext_size);
int timerfd = timerfd_create(CLOCK_REALTIME, TFD_NONBLOCK | TFD_CLOEXEC);
if (timerfd == -1) {
  return NULL;
}

Leaks p if the timer fails to be created.

partyblob commented 1 month ago

Fixed in #231