We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents cdbc580 + 6ec0ad1 commit e98066fCopy full SHA for e98066f
wolfcrypt/src/async.c
@@ -933,13 +933,18 @@ int wc_AsyncThreadCreate_ex(pthread_t *thread,
933
934
/*destroy the thread attributes as they are no longer required, this does
935
* not affect the created thread*/
936
- pthread_attr_destroy(&attr);
937
- return 0;
+ status = pthread_attr_destroy(&attr);
+ if (status != 0) {
938
+ fprintf(stderr, "AsyncThreadCreate error: %d\n", status);
939
+ return ASYNC_OP_E;
940
+ } else {
941
+ return 0;
942
+ }
943
944
exit_fail:
945
946
fprintf(stderr, "AsyncThreadCreate error: %d\n", status);
947
+ (void)pthread_attr_destroy(&attr);
948
return ASYNC_OP_E;
949
}
950
0 commit comments