diff options
-rw-r--r-- | lib/util/smb_threads.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/util/smb_threads.c b/lib/util/smb_threads.c index 6f84a2e747..e2d01f775a 100644 --- a/lib/util/smb_threads.c +++ b/lib/util/smb_threads.c @@ -121,6 +121,9 @@ int smb_thread_once(smb_thread_once_t *ponce, void (*init_fn)(void)) if (! *ponce) { /* Nope, we need to run the initialization function */ (*init_fn)(); + + /* Now we can indicate that the function has been run */ + *ponce = true; } /* Unlock the mutex */ |