babl: fix mutex lock/unlocks symmetry in babl_fish()
authorØyvind Kolås <pippin@gimp.org>
Wed, 9 Feb 2022 19:03:46 +0000 (20:03 +0100)
committerØyvind Kolås <pippin@gimp.org>
Wed, 9 Feb 2022 19:05:52 +0000 (20:05 +0100)
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

index aece33b8cb2de636d4ed34f0009d0199a34a7b4e..06d796121b792975376ba3924c84d2639bdac31c 100644 (file)
@@ -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
       {