Fallout from buffer conversion in AUDIT_EVENTS.

Supply missing "int r" and fix error path for sshbuf_new().
This commit is contained in:
Darren Tucker 2018-07-13 13:38:10 +10:00
parent 7449c178e9
commit 1dd32c23f2
1 changed files with 4 additions and 2 deletions

View File

@ -946,11 +946,12 @@ void
mm_audit_event(ssh_audit_event_t event) mm_audit_event(ssh_audit_event_t event)
{ {
struct sshbuf *m; struct sshbuf *m;
int r;
debug3("%s entering", __func__); debug3("%s entering", __func__);
if ((m = sshbuf_new()) == NULL) if ((m = sshbuf_new()) == NULL)
fatal("%s: buffer error: %s", __func__, ssh_err(r)); fatal("%s: sshbuf_new failed", __func__);
if ((r = sshbuf_put_u32(m, event)) != 0) if ((r = sshbuf_put_u32(m, event)) != 0)
fatal("%s: buffer error: %s", __func__, ssh_err(r)); fatal("%s: buffer error: %s", __func__, ssh_err(r));
@ -962,11 +963,12 @@ void
mm_audit_run_command(const char *command) mm_audit_run_command(const char *command)
{ {
struct sshbuf *m; struct sshbuf *m;
int r;
debug3("%s entering command %s", __func__, command); debug3("%s entering command %s", __func__, command);
if ((m = sshbuf_new()) == NULL) if ((m = sshbuf_new()) == NULL)
fatal("%s: buffer error: %s", __func__, ssh_err(r)); fatal("%s: sshbuf_new failed", __func__);
if ((r = sshbuf_put_cstring(m, command)) != 0) if ((r = sshbuf_put_cstring(m, command)) != 0)
fatal("%s: buffer error: %s", __func__, ssh_err(r)); fatal("%s: buffer error: %s", __func__, ssh_err(r));