fccfg.c: lock_config: Fix potential memory leak

We would malloc for every try, never cleaning up.
This commit is contained in:
Jacko Dirks 2021-01-13 14:25:59 +01:00
parent 643c3f1e27
commit b7e4931582
1 changed files with 1 additions and 0 deletions

View File

@ -54,6 +54,7 @@ retry:
if (!fc_atomic_ptr_cmpexch (&_lock, NULL, lock)) if (!fc_atomic_ptr_cmpexch (&_lock, NULL, lock))
{ {
FcMutexFinish (lock); FcMutexFinish (lock);
free (lock);
goto retry; goto retry;
} }
FcMutexLock (lock); FcMutexLock (lock);