base = calloc(1, sizeof(*base));
if (base == NULL) {
- sudo_debug_printf(SUDO_DEBUG_ERROR,
+ sudo_debug_printf(SUDO_DEBUG_ERROR|SUDO_DEBUG_LINENO,
"%s: unable to allocate base", __func__);
debug_return_ptr(NULL);
}
ev = calloc(1, sizeof(*ev));
if (ev == NULL) {
- sudo_debug_printf(SUDO_DEBUG_ERROR,
+ sudo_debug_printf(SUDO_DEBUG_ERROR|SUDO_DEBUG_LINENO,
"%s: unable to allocate event", __func__);
debug_return_ptr(NULL);
}
base->pfd_max = 32;
base->pfds = reallocarray(NULL, base->pfd_max, sizeof(struct pollfd));
if (base->pfds == NULL) {
- sudo_debug_printf(SUDO_DEBUG_ERROR,
+ sudo_debug_printf(SUDO_DEBUG_ERROR|SUDO_DEBUG_LINENO,
"%s: unable to allocate %d pollfds", __func__, base->pfd_max);
base->pfd_max = 0;
debug_return_int(-1);
pfds =
reallocarray(base->pfds, base->pfd_max, 2 * sizeof(struct pollfd));
if (pfds == NULL) {
- sudo_debug_printf(SUDO_DEBUG_ERROR,
+ sudo_debug_printf(SUDO_DEBUG_ERROR|SUDO_DEBUG_LINENO,
"%s: unable to allocate %d pollfds", __func__, base->pfd_max * 2);
debug_return_int(-1);
}
if (base->readfds_in == NULL || base->writefds_in == NULL ||
base->readfds_out == NULL || base->writefds_out == NULL) {
- sudo_debug_printf(SUDO_DEBUG_WARN, "%s: unable to calloc(1, %zu)",
- __func__, sizeof(fd_mask));
+ sudo_debug_printf(SUDO_DEBUG_ERROR|SUDO_DEBUG_LINENO,
+ "%s: unable to calloc(1, %zu)", __func__, sizeof(fd_mask));
sudo_ev_base_free_impl(base);
debug_return_int(-1);
}
wfds_out = reallocarray(base->writefds_out, n, sizeof(fd_mask));
if (rfds_in == NULL || wfds_in == NULL ||
rfds_out == NULL || wfds_out == NULL) {
- sudo_debug_printf(SUDO_DEBUG_WARN,
+ sudo_debug_printf(SUDO_DEBUG_ERROR|SUDO_DEBUG_LINENO,
"%s: unable to reallocarray(%d, %zu)",
__func__, n, sizeof(fd_mask));
free(rfds_in);