[babl] babl: fix mutex lock/unlocks symmetry in babl_fish()



commit cbad95a756467f8ccc07d6d00bfff8d689e0c1c9
Author: Øyvind Kolås <pippin gimp org>
Date:   Wed Feb 9 20:03:46 2022 +0100

    babl: fix mutex lock/unlocks symmetry in babl_fish()
    
    In the case where the fish we are to look up is the memcpy fish we were
    not locking the mutex. Whereas the common cleanup after the branches
    assumes the lock is held. This is probably the cause of gimp#7632.

 babl/babl-fish.c | 1 +
 1 file changed, 1 insertion(+)
---
diff --git a/babl/babl-fish.c b/babl/babl-fish.c
index aece33b8c..06d796121 100644
--- a/babl/babl-fish.c
+++ b/babl/babl-fish.c
@@ -253,6 +253,7 @@ babl_fish (const void *source,
          * we will search through the fish database for reference fish
          * to handle the memcpy */
         babl_hash_table_find (id_htable, hashval, find_memcpy_fish, (void *) &ffish);
+        babl_mutex_lock (babl_fish_mutex);
       }
     else
       {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]