taskprocessor.c: Simplify ast_taskprocessor_get() return code.
authorRichard Mudgett <rmudgett@digium.com>
Fri, 10 Jul 2015 15:37:35 +0000 (10:37 -0500)
committerRichard Mudgett <rmudgett@digium.com>
Fri, 15 Jan 2016 18:44:33 +0000 (12:44 -0600)
Change-Id: Id5bd18ef1f60ef8be453e677e98478298358a9d1

main/taskprocessor.c

index 9a4424e..5f2f8de 100644 (file)
@@ -713,12 +713,7 @@ struct ast_taskprocessor *ast_taskprocessor_get(const char *name, enum ast_tps_o
        }
 
        p = __allocate_taskprocessor(name, listener);
-       if (!p) {
-               ao2_ref(listener, -1);
-               return NULL;
-       }
 
-       /* Unref listener here since the taskprocessor has gained a reference to the listener */
        ao2_ref(listener, -1);
        return p;
 }