* [PATCH] smokey: posix_mutex: Fix mutex/smokey_barrier leak
@ 2021-07-29 11:29 Florian Bezdeka
2021-08-02 8:20 ` Jan Kiszka
0 siblings, 1 reply; 2+ messages in thread
From: Florian Bezdeka @ 2021-07-29 11:29 UTC (permalink / raw)
To: xenomai
The mutex of the smokey_barrier used inside protect_handover() was
never destroyed. This had side effects when trying to extend the test
suite with an additional function that had a mutex located on the same
address than the never cleaned up smokey_barrier lock.
Signed-off-by: Florian Bezdeka <florian.bezdeka@siemens.com>
---
testsuite/smokey/posix-mutex/posix-mutex.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/testsuite/smokey/posix-mutex/posix-mutex.c b/testsuite/smokey/posix-mutex/posix-mutex.c
index 9a55d0973..e5793c42c 100644
--- a/testsuite/smokey/posix-mutex/posix-mutex.c
+++ b/testsuite/smokey/posix-mutex/posix-mutex.c
@@ -997,6 +997,8 @@ static int protect_handover(void)
if (!__T(ret, pthread_mutex_destroy(&mutex)))
return ret;
+ smokey_barrier_destroy(&barrier);
+
return 0;
}
--
2.30.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] smokey: posix_mutex: Fix mutex/smokey_barrier leak
2021-07-29 11:29 [PATCH] smokey: posix_mutex: Fix mutex/smokey_barrier leak Florian Bezdeka
@ 2021-08-02 8:20 ` Jan Kiszka
0 siblings, 0 replies; 2+ messages in thread
From: Jan Kiszka @ 2021-08-02 8:20 UTC (permalink / raw)
To: Florian Bezdeka, xenomai
On 29.07.21 13:29, Florian Bezdeka wrote:
> The mutex of the smokey_barrier used inside protect_handover() was
> never destroyed. This had side effects when trying to extend the test
> suite with an additional function that had a mutex located on the same
> address than the never cleaned up smokey_barrier lock.
>
> Signed-off-by: Florian Bezdeka <florian.bezdeka@siemens.com>
> ---
> testsuite/smokey/posix-mutex/posix-mutex.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/testsuite/smokey/posix-mutex/posix-mutex.c b/testsuite/smokey/posix-mutex/posix-mutex.c
> index 9a55d0973..e5793c42c 100644
> --- a/testsuite/smokey/posix-mutex/posix-mutex.c
> +++ b/testsuite/smokey/posix-mutex/posix-mutex.c
> @@ -997,6 +997,8 @@ static int protect_handover(void)
> if (!__T(ret, pthread_mutex_destroy(&mutex)))
> return ret;
>
> + smokey_barrier_destroy(&barrier);
> +
> return 0;
> }
>
>
Thanks, applied.
Jan
--
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-08-02 8:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-29 11:29 [PATCH] smokey: posix_mutex: Fix mutex/smokey_barrier leak Florian Bezdeka
2021-08-02 8:20 ` Jan Kiszka
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.