Replace sudo_fatal(NULL) with an "unable to allocate memory" message

that includes the function name.
This commit is contained in:
Todd C. Miller
2018-10-12 08:39:12 -06:00
parent 9e269e0acd
commit b89cf34b53
4 changed files with 41 additions and 41 deletions

View File

@@ -571,10 +571,10 @@ xterm_get_size(int *new_rows, int *new_cols)
/* Setup an event for reading the terminal size */
evbase = sudo_ev_base_alloc();
if (evbase == NULL)
sudo_fatal(NULL);
sudo_fatalx(U_("%s: %s"), __func__, U_("unable to allocate memory"));
gc.ev = sudo_ev_alloc(ttyfd, SUDO_EV_READ, getsize_cb, &gc);
if (gc.ev == NULL)
sudo_fatal(NULL);
sudo_fatalx(U_("%s: %s"), __func__, U_("unable to allocate memory"));
/* Read back terminal size response */
if (sudo_ev_add(evbase, gc.ev, &gc.timeout, false) == -1)