smokey: posix_mutex: Fix mutex/smokey_barrier leak
PATCH 1/1 smokey: posix_mutex: Fix mutex/smokey_barrier leak
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 <[email protected]>
--- testsuite/smokey/posix-mutex/posix-mutex.c | 2 ++ 1 file changed, 2 insertions(+)
testsuite/smokey/posix-mutex/posix-mutex.c +2 -0
@@ -997,6 +997,8 @@ static int protect_handover(void)if (!__T (ret,pthread_mutex_destroy (&mutex)))return ret; +smokey_barrier_destroy (&barrier); +return 0 ; }
Signature · 1 line
2.30.2
Jan Kiszka
AppliedQuoted 16 lines · Florian Bezdeka
The mutex of the
smokey_barrierused insideprotect_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 upsmokey_barrierlock.Signed-off-by Florian Bezdeka <[email protected]>--- testsuite/smokey/posix-mutex/posix-mutex.c | 2 ++ 1 file changed, 2 insertions(+)testsuite/smokey/posix-mutex/posix-mutex.c +0
-0
testsuite/smokey/posix-mutex/posix-mutex.c static int protect_handover(void) · line 1004
Quoted 8 lines
testsuite/smokey/posix-mutex/posix-mutex.c +2
-0@@ -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
Signature · 2 lines
Siemens AG, T RDA IOT Corporate Competence Center Embedded Linux