mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-06 12:36:58 +00:00
taskprocessor.c: Simplify ast_taskprocessor_get() return code.
Change-Id: Id5bd18ef1f60ef8be453e677e98478298358a9d1
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user