[igt-dev] [PATCH i-g-t 1/3] runner: Make sure we don't close watchdogs twice
Ser, Simon
simon.ser at intel.com
Wed Jul 10 08:18:44 UTC 2019
On Tue, 2019-07-09 at 15:23 +0300, Arkadiusz Hiler wrote:
> Setting the watchdog fd lists to NULL for extra fireworks if accessed
> unintentionally.
>
> Cc: Petri Latvala <petri.latvala at intel.com>
> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler at intel.com>
Reviewed-by: Simon Ser <simon.ser at intel.com>
> ---
> runner/executor.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> 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)
More information about the igt-dev
mailing list