Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
FORMUS3IC_LAS3
/
embb
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
10f8e503
authored
Jan 29, 2015
by
Marcus Winter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
base_c: need to free mutex attributes in case of error
parent
ca1e415c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletions
+5
-1
base_c/src/mutex.c
+5
-1
No files found.
base_c/src/mutex.c
View file @
10f8e503
...
...
@@ -71,9 +71,13 @@ int embb_mutex_init(embb_mutex_t* mutex, int type) {
pthread_mutexattr_t
attributes
;
if
(
pthread_mutexattr_init
(
&
attributes
)
!=
0
)
return
EMBB_ERROR
;
if
(
pthread_mutexattr_settype
(
&
attributes
,
PTHREAD_MUTEX_RECURSIVE
)
!=
0
)
{
pthread_mutexattr_destroy
(
&
attributes
);
return
EMBB_ERROR
;
}
if
(
pthread_mutex_init
(
mutex
,
&
attributes
)
!=
0
)
{
pthread_mutexattr_destroy
(
&
attributes
);
return
EMBB_ERROR
;
}
if
(
pthread_mutex_init
(
mutex
,
&
attributes
)
!=
0
)
return
EMBB_ERROR
;
if
(
pthread_mutexattr_destroy
(
&
attributes
)
!=
0
)
return
EMBB_ERROR
;
}
return
EMBB_SUCCESS
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment