=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/cmd-if-shell.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- src/usr.bin/tmux/cmd-if-shell.c 2009/10/11 09:10:57 1.5 +++ src/usr.bin/tmux/cmd-if-shell.c 2009/11/01 23:20:37 1.6 @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-if-shell.c,v 1.5 2009/10/11 09:10:57 nicm Exp $ */ +/* $OpenBSD: cmd-if-shell.c,v 1.6 2009/11/01 23:20:37 nicm Exp $ */ /* * Copyright (c) 2009 Tiago Cunha @@ -65,7 +65,7 @@ if (ctx->curclient != NULL) ctx->curclient->references++; - job = job_add(NULL, NULL, + job = job_add(NULL, 0, NULL, data->arg, cmd_if_shell_callback, cmd_if_shell_free, cdata); job_run(job); @@ -80,10 +80,8 @@ struct cmd_list *cmdlist; char *cause; - if (!WIFEXITED(job->status) || WEXITSTATUS(job->status) != 0) { - job_free(job); /* calls cmd_if_shell_free */ + if (!WIFEXITED(job->status) || WEXITSTATUS(job->status) != 0) return; - } if (cmd_string_parse(cdata->cmd, &cmdlist, &cause) != 0) { if (cause != NULL) {