Do not deref NULL job in window_copy_pipe_run when job_run fails. From

Barrett Ruth in GitHub issue 5036.
This commit is contained in:
nicm
2026-04-28 08:35:21 +00:00
parent ec58272b95
commit 2a5715fad5

View File

@@ -5171,6 +5171,7 @@ window_copy_pipe_run(struct window_mode_entry *wme, struct session *s,
if (cmd != NULL && *cmd != '\0') {
job = job_run(cmd, 0, NULL, NULL, s, NULL, NULL, NULL, NULL,
NULL, JOB_NOWAIT, -1, -1);
if (job != NULL)
bufferevent_write(job_get_event(job), buf, *len);
}
return (buf);