mirror of
git://git.gnupg.org/gnupg.git
synced 2024-06-01 22:28:02 +02:00
agent: Fix error code check from npth_mutex_init.
* agent/call-pinentry.c (initialize_module_call_pinentry): It's an
error when npth_mutex_init returns non-zero.
--
Cherry-pick from master commit of:
adce73b86f
Actually, initialize_module_call_pinentry is only called once from
main. So, this bug had no harm and having the static variable
INITIALIZED is not needed.
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
91f8a9b33a
commit
213379debe
|
@ -98,11 +98,15 @@ void
|
||||||
initialize_module_call_pinentry (void)
|
initialize_module_call_pinentry (void)
|
||||||
{
|
{
|
||||||
static int initialized;
|
static int initialized;
|
||||||
|
int err;
|
||||||
|
|
||||||
if (!initialized)
|
if (!initialized)
|
||||||
{
|
{
|
||||||
if (npth_mutex_init (&entry_lock, NULL))
|
err = npth_mutex_init (&entry_lock, NULL);
|
||||||
initialized = 1;
|
if (err)
|
||||||
|
log_fatal ("error initializing mutex: %s\n", strerror (err));
|
||||||
|
|
||||||
|
initialized = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user