Ignore NULL streams in StreamPool_Return
authorArmin Novak <armin.novak@thincast.com>
Wed, 2 Sep 2020 08:09:48 +0000 (10:09 +0200)
committerakallabeth <akallabeth@users.noreply.github.com>
Tue, 1 Dec 2020 14:10:23 +0000 (15:10 +0100)
(cherry picked from commit 6351885488c38327b4f59f3686d68ddd8dc0f745)

winpr/libwinpr/utils/collections/StreamPool.c

index b8b3cb5..7be359e 100644 (file)
@@ -201,6 +201,9 @@ out_fail:
 
 void StreamPool_Return(wStreamPool* pool, wStream* s)
 {
+       if (!s)
+               return;
+
        if (pool->synchronized)
                EnterCriticalSection(&pool->lock);