mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-21 09:10:36 +00:00
Merge "threadpool: Fix leak in ast_threadpool_serializer_group error path."
This commit is contained in:
@@ -1384,10 +1384,12 @@ struct ast_taskprocessor *ast_threadpool_serializer_group(const char *name,
|
|||||||
ao2_ref(ser, -1);
|
ao2_ref(ser, -1);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
/* ser ref transferred to listener */
|
|
||||||
|
|
||||||
tps = ast_taskprocessor_create_with_listener(name, listener);
|
tps = ast_taskprocessor_create_with_listener(name, listener);
|
||||||
if (tps && shutdown_group) {
|
if (!tps) {
|
||||||
|
/* ser ref transferred to listener but not cleaned without tps */
|
||||||
|
ao2_ref(ser, -1);
|
||||||
|
} else if (shutdown_group) {
|
||||||
serializer_shutdown_group_inc(shutdown_group);
|
serializer_shutdown_group_inc(shutdown_group);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user