diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2013-03-22 15:55:22 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2013-03-22 15:55:22 +0000 |
commit | c519f9a84cd9fc3fdec8b61afaf42995f9e48b46 (patch) | |
tree | d919d29ab80617b5f44f43952bfe3cf6b6dc1542 /status.c | |
parent | 2243cfbe7559e6cf48194ff95dcd7eb6df5fe41d (diff) |
evbuffer_readline returns allocated storage, don't leak it.
Diffstat (limited to 'status.c')
-rw-r--r-- | status.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -676,7 +676,7 @@ status_job_callback(struct job *job) memcpy(buf, EVBUFFER_DATA(job->event->input), len); buf[len] = '\0'; } else - buf = xstrdup(line); + buf = line; so->out = buf; server_status_client(c); @@ -1042,7 +1042,7 @@ status_prompt_key(struct client *c, int key) size_t size, n, off, idx; size = strlen(c->prompt_buffer); - switch (mode_key_lookup(&c->prompt_mdata, key)) { + switch (mode_key_lookup(&c->prompt_mdata, key, NULL)) { case MODEKEYEDIT_CURSORLEFT: if (c->prompt_index > 0) { c->prompt_index--; |