mirror of
https://github.com/emqx/neuron.git
synced 2026-10-18 13:41:22 +08:00
Fix use-after-free in mqtt api GET_SUBSCRIBE_GROUP_CONFIG
This commit is contained in:
@@ -215,11 +215,13 @@ char *command_get_group_config_subscribes(neu_plugin_t * plugin,
|
||||
}
|
||||
|
||||
vector_free(configs);
|
||||
free(sub_grp_configs.groups);
|
||||
|
||||
char *result = NULL;
|
||||
neu_json_encode_with_mqtt(&sub_grp_configs,
|
||||
neu_json_encode_get_subscribe_resp, mqtt,
|
||||
neu_json_encode_mqtt_resp, &result);
|
||||
|
||||
free(sub_grp_configs.groups);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user