Skip to content
Snippets Groups Projects
Commit d36c4d0b authored by Richard Mudgett's avatar Richard Mudgett
Browse files

taskprocessor.c: Simplify ast_taskprocessor_get() return code.

Change-Id: Id5bd18ef1f60ef8be453e677e98478298358a9d1
parent c3d458d2
No related branches found
No related tags found
No related merge requests found
...@@ -713,12 +713,7 @@ struct ast_taskprocessor *ast_taskprocessor_get(const char *name, enum ast_tps_o ...@@ -713,12 +713,7 @@ struct ast_taskprocessor *ast_taskprocessor_get(const char *name, enum ast_tps_o
} }
p = __allocate_taskprocessor(name, listener); 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); ao2_ref(listener, -1);
return p; return p;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment