From 2dd776315c99816b707993c5cd2c69a4e1efbd48 Mon Sep 17 00:00:00 2001 From: Philipp Storz Date: Wed, 18 Dec 2013 12:34:03 +0100 Subject: [PATCH] Fixed wrong handling of cancel command Fixes #261: cancel all" crashs often director --- src/dird/ua_select.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/dird/ua_select.c b/src/dird/ua_select.c index a4d007e36f1..44cfb60198d 100644 --- a/src/dird/ua_select.c +++ b/src/dird/ua_select.c @@ -1217,14 +1217,13 @@ alist *select_jobs(UAContext *ua, const char *reason) ua->error_msg(_("Unauthorized command from this console.\n")); goto bail_out; } - } - - if (insert_selected_jobid(selected_jobids, jcr->JobId)) { - cnt++; - } + if (insert_selected_jobid(selected_jobids, jcr->JobId)) { + cnt++; + } free_jcr(jcr); jcr = NULL; + } } }