diff mbox

linux-generic: linux: destroy used pthread attr

Message ID 1426723353-8463-1-git-send-email-mike.holmes@linaro.org
State Accepted
Commit 70056994efc9a85d01540c1da143b72fb636eb50
Headers show

Commit Message

Mike Holmes March 19, 2015, 12:02 a.m. UTC
Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
---
 platform/linux-generic/odp_linux.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Mike Holmes March 26, 2015, 4:57 p.m. UTC | #1
ping

On 18 March 2015 at 20:02, Mike Holmes <mike.holmes@linaro.org> wrote:

> Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
> ---
>  platform/linux-generic/odp_linux.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/platform/linux-generic/odp_linux.c
> b/platform/linux-generic/odp_linux.c
> index 67ad05c..a471dd6 100644
> --- a/platform/linux-generic/odp_linux.c
> +++ b/platform/linux-generic/odp_linux.c
> @@ -140,6 +140,7 @@ void odph_linux_pthread_join(odph_linux_pthread_t
> *thread_tbl, int num)
>         for (i = 0; i < num; i++) {
>                 /* Wait thread to exit */
>                 pthread_join(thread_tbl[i].thread, NULL);
> +               pthread_attr_destroy(&thread_tbl[i].attr);
>                 free(thread_tbl[i].start_args);
>         }
>
> --
> 2.1.0
>
>
Bill Fischofer March 26, 2015, 9:12 p.m. UTC | #2
On Wed, Mar 18, 2015 at 7:02 PM, Mike Holmes <mike.holmes@linaro.org> wrote:

> Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
>

Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>


> ---
>  platform/linux-generic/odp_linux.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/platform/linux-generic/odp_linux.c
> b/platform/linux-generic/odp_linux.c
> index 67ad05c..a471dd6 100644
> --- a/platform/linux-generic/odp_linux.c
> +++ b/platform/linux-generic/odp_linux.c
> @@ -140,6 +140,7 @@ void odph_linux_pthread_join(odph_linux_pthread_t
> *thread_tbl, int num)
>         for (i = 0; i < num; i++) {
>                 /* Wait thread to exit */
>                 pthread_join(thread_tbl[i].thread, NULL);
> +               pthread_attr_destroy(&thread_tbl[i].attr);
>                 free(thread_tbl[i].start_args);
>         }
>
> --
> 2.1.0
>
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/lng-odp
>
Maxim Uvarov March 27, 2015, 2:59 p.m. UTC | #3
Merged,
Maxim.

On 03/27/15 00:12, Bill Fischofer wrote:
>
>
> On Wed, Mar 18, 2015 at 7:02 PM, Mike Holmes <mike.holmes@linaro.org 
> <mailto:mike.holmes@linaro.org>> wrote:
>
>     Signed-off-by: Mike Holmes <mike.holmes@linaro.org
>     <mailto:mike.holmes@linaro.org>>
>
>
> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org 
> <mailto:bill.fischofer@linaro.org>>
>
>     ---
>      platform/linux-generic/odp_linux.c | 1 +
>      1 file changed, 1 insertion(+)
>
>     diff --git a/platform/linux-generic/odp_linux.c
>     b/platform/linux-generic/odp_linux.c
>     index 67ad05c..a471dd6 100644
>     --- a/platform/linux-generic/odp_linux.c
>     +++ b/platform/linux-generic/odp_linux.c
>     @@ -140,6 +140,7 @@ void
>     odph_linux_pthread_join(odph_linux_pthread_t *thread_tbl, int num)
>             for (i = 0; i < num; i++) {
>                     /* Wait thread to exit */
>                     pthread_join(thread_tbl[i].thread, NULL);
>     +  pthread_attr_destroy(&thread_tbl[i].attr);
>                     free(thread_tbl[i].start_args);
>             }
>
>     --
>     2.1.0
>
>
>     _______________________________________________
>     lng-odp mailing list
>     lng-odp@lists.linaro.org <mailto:lng-odp@lists.linaro.org>
>     http://lists.linaro.org/mailman/listinfo/lng-odp
>
>
>
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/lng-odp
diff mbox

Patch

diff --git a/platform/linux-generic/odp_linux.c b/platform/linux-generic/odp_linux.c
index 67ad05c..a471dd6 100644
--- a/platform/linux-generic/odp_linux.c
+++ b/platform/linux-generic/odp_linux.c
@@ -140,6 +140,7 @@  void odph_linux_pthread_join(odph_linux_pthread_t *thread_tbl, int num)
 	for (i = 0; i < num; i++) {
 		/* Wait thread to exit */
 		pthread_join(thread_tbl[i].thread, NULL);
+		pthread_attr_destroy(&thread_tbl[i].attr);
 		free(thread_tbl[i].start_args);
 	}