Resolve a ref leak in threadpool.c
authorKinsey Moore <kmoore@digium.com>
Wed, 6 Mar 2013 15:21:42 +0000 (15:21 +0000)
committerKinsey Moore <kmoore@digium.com>
Wed, 6 Mar 2013 15:21:42 +0000 (15:21 +0000)
Ownership of the listener reference is not transferred because the
listener is reffed when placed into the taskprocessor. Ensure that the
listener is dereffed properly.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@382489 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/threadpool.c

index 58647d5..1bf6003 100644 (file)
@@ -1188,7 +1188,6 @@ struct ast_taskprocessor *ast_threadpool_serializer(const char *name, struct ast
        if (!tps) {
                return NULL;
        }
        if (!tps) {
                return NULL;
        }
-       listener = NULL; /* ownership transferred to tps */
 
        return tps;
 }
 
        return tps;
 }