Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-crypto
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
libvmod-crypto
Commits
501a5dcf
Unverified
Commit
501a5dcf
authored
Jan 06, 2021
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Assert pthread_mutex_*
parent
80ff1d00
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
vmod_crypto.c
src/vmod_crypto.c
+4
-4
No files found.
src/vmod_crypto.c
View file @
501a5dcf
...
...
@@ -75,9 +75,9 @@ crypto_lock(int mode, size_t n, const char *file, int line)
assert
(
n
<
crypto_locks_n
);
if
(
mode
&
CRYPTO_LOCK
)
pthread_mutex_lock
(
&
crypto_locks
[
n
]
);
AZ
(
pthread_mutex_lock
(
&
crypto_locks
[
n
])
);
else
pthread_mutex_unlock
(
&
crypto_locks
[
n
]
);
AZ
(
pthread_mutex_unlock
(
&
crypto_locks
[
n
])
);
}
static
__attribute__
((
constructor
))
void
...
...
@@ -93,7 +93,7 @@ init(void)
crypto_locks_n
=
n
;
for
(
i
=
0
;
i
<
n
;
i
++
)
pthread_mutex_init
(
&
crypto_locks
[
i
],
NULL
);
AZ
(
pthread_mutex_init
(
&
crypto_locks
[
i
],
NULL
)
);
CRYPTO_set_id_callback
(
crypto_thread_id
);
CRYPTO_set_locking_callback
(
crypto_lock
);
...
...
@@ -115,7 +115,7 @@ fini(void)
CRYPTO_set_locking_callback
(
NULL
);
for
(
i
=
0
;
i
<
crypto_locks_n
;
i
++
)
pthread_mutex_destroy
(
&
crypto_locks
[
i
]
);
AZ
(
pthread_mutex_destroy
(
&
crypto_locks
[
i
])
);
free
(
TRUST_ME
(
crypto_locks
));
crypto_locks
=
NULL
;
...
...
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