mirror of
https://github.com/eclipse-mosquitto/mosquitto.git
synced 2026-05-07 20:39:34 +08:00
Fix unlikely use-after free on out of memory
This commit is contained in:
committed by
Roger Light
parent
f2d80aa6b8
commit
2a06f4434c
@@ -149,8 +149,6 @@ int dynsec__process_get_default_acl_access(struct dynsec__data *data, struct mos
|
||||
goto internal_error;
|
||||
}
|
||||
|
||||
cJSON_AddItemToArray(cmd->j_responses, tree);
|
||||
|
||||
if(cmd->correlation_data){
|
||||
jtmp = cJSON_AddStringToObject(tree, "correlationData", cmd->correlation_data);
|
||||
if(jtmp == NULL){
|
||||
@@ -158,6 +156,8 @@ int dynsec__process_get_default_acl_access(struct dynsec__data *data, struct mos
|
||||
}
|
||||
}
|
||||
|
||||
cJSON_AddItemToArray(cmd->j_responses, tree);
|
||||
|
||||
return MOSQ_ERR_SUCCESS;
|
||||
|
||||
internal_error:
|
||||
|
||||
Reference in New Issue
Block a user