]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
[POOL] Allow free on NULL when multithreading is disabled 832/head
authorNick Terrell <terrelln@fb.com>
Tue, 5 Sep 2017 18:18:13 +0000 (11:18 -0700)
committerNick Terrell <terrelln@fb.com>
Tue, 5 Sep 2017 18:18:13 +0000 (11:18 -0700)
lib/common/pool.c

index 9567d112f26300743b6245caf607d309450a9a9f..d7080f034e3f2805230f640c3d8494b47ccc1b41 100644 (file)
@@ -236,7 +236,7 @@ POOL_ctx* POOL_create_advanced(size_t numThreads, size_t queueSize, ZSTD_customM
 }
 
 void POOL_free(POOL_ctx* ctx) {
-    assert(ctx == &g_ctx);
+    assert(!ctx || ctx == &g_ctx);
     (void)ctx;
 }