Use "unable to allocate memory" warning on malloc failure.
This is consistent with the rest of the sudo source code.
This commit is contained in:
@@ -288,7 +288,7 @@ read_io_buf(struct client_closure *closure)
|
||||
free(closure->buf);
|
||||
closure->bufsize = sudo_pow2_roundup(timing->u.nbytes);
|
||||
if ((closure->buf = malloc(closure->bufsize)) == NULL) {
|
||||
sudo_warn(NULL);
|
||||
sudo_warnx(U_("%s: %s"), __func__, U_("unable to allocate memory"));
|
||||
timing->u.nbytes = 0;
|
||||
debug_return_bool(false);
|
||||
}
|
||||
|
Reference in New Issue
Block a user