Description: <short summary of the patch>
 TODO: Put a short summary on the line above and replace this paragraph
 with a longer explanation of this change. Complete the meta-information
 with other relevant fields (see below for details). To make it easier, the
 information below has been extracted from the changelog. Adjust it or drop
 it.
 .
 djvulibre (3.5.26-1) experimental; urgency=medium
 .
   * upstream reworked build system, uses automake and pkg-config
   * move debian vs upstream library version check into dh_testdir
   * add --list-missing option to dh_install
   * update upstream git URL
   * new upstream release
   * merge upstream patches
     - afdbb99 acquire global lock while destroying gctls_t
Author: Barak A. Pearlmutter <bap@debian.org>

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: https://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: <YYYY-MM-DD>

--- djvulibre-3.5.26.orig/libdjvu/miniexp.cpp
+++ djvulibre-3.5.26/libdjvu/miniexp.cpp
@@ -323,7 +323,7 @@ END_ANONYMOUS_NAMESPACE
 static pthread_key_t gctls_key;
 static pthread_once_t gctls_once;
 static void gctls_destroy(void* arg) {
-  delete (gctls_t*)arg;
+  CSLOCK(locker); delete (gctls_t*)arg;
 }
 static void gctls_key_alloc() {
   pthread_key_create(&gctls_key, gctls_destroy);
