summaryrefslogtreecommitdiff
path: root/runner
diff options
context:
space:
mode:
authorArkadiusz Hiler <arkadiusz.hiler@intel.com>2019-07-09 15:23:43 +0300
committerArkadiusz Hiler <arkadiusz.hiler@intel.com>2019-07-22 13:50:38 +0300
commit27002e4fe948abde54e7bcc8d29e43b60ca584dc (patch)
tree3cc7e4af1211eb0c64c7711cc4ea79066d405d32 /runner
parentc77beecef80ec6a19d24347ed1a423805ac8a535 (diff)
runner: Make sure we don't close watchdogs twice
Setting the watchdog fd lists to NULL for extra fireworks if accessed unintentionally. Cc: Petri Latvala <petri.latvala@intel.com> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com> Reviewed-by: Simon Ser <simon.ser@intel.com> Reviewed-by: Petri Latvala <petri.latvala@intel.com>
Diffstat (limited to 'runner')
-rw-r--r--runner/executor.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/runner/executor.c b/runner/executor.c
index 7a7e29d9..af02c5a8 100644
--- a/runner/executor.c
+++ b/runner/executor.c
@@ -46,6 +46,10 @@ static void close_watchdogs(struct settings *settings)
for (i = 0; i < watchdogs.num_dogs; i++) {
__close_watchdog(watchdogs.fds[i]);
}
+
+ free(watchdogs.fds);
+ watchdogs.num_dogs = 0;
+ watchdogs.fds = NULL;
}
static void close_watchdogs_atexit(void)