]> git.ipfire.org Git - thirdparty/cups-filters.git/commitdiff
libppd: In string.c added _ppdMutexUnlock() also before abort()
authorTill Kamppeter <till.kamppeter@gmail.com>
Mon, 20 Sep 2021 08:36:28 +0000 (10:36 +0200)
committerTill Kamppeter <till.kamppeter@gmail.com>
Mon, 20 Sep 2021 08:36:28 +0000 (10:36 +0200)
Issue #423.

Note: This actually only applied when building with DEBUG_GUARDS set.

ppd/string.c

index 2bfa758e727f541cf9638625e51b39fd41de363a..a1da5dbcb879c72df3d5a7863adc120f220c9858 100644 (file)
@@ -93,7 +93,10 @@ _ppdStrAlloc(const char *s)          /* I - String */
                  item->ref_count));
 
     if (item->guard != _PPD_STR_GUARD)
+    {
+      _ppdMutexUnlock(&sp_mutex);
       abort();
+    }
 #endif /* DEBUG_GUARDS */
 
     _ppdMutexUnlock(&sp_mutex);
@@ -292,6 +295,7 @@ _ppdStrFree(const char *s)          /* I - String to free */
     if (key->guard != _PPD_STR_GUARD)
     {
       DEBUG_printf(("5_ppdStrFree: Freeing string %p(%s), guard=%08x, ref_count=%d", key, key->str, key->guard, key->ref_count));
+      _ppdMutexUnlock(&sp_mutex);
       abort();
     }
 #endif /* DEBUG_GUARDS */