mirror of
https://github.com/Waujito/youtubeUnblock.git
synced 2026-01-01 14:18:49 +03:00
fix: проверка указателя до его использования
This commit is contained in:
@@ -1243,11 +1243,11 @@ int init_section_config(struct section_config_t **section, struct section_config
|
|||||||
def_section = malloc(sizeof(struct section_config_t));
|
def_section = malloc(sizeof(struct section_config_t));
|
||||||
#endif
|
#endif
|
||||||
*def_section = (struct section_config_t)default_section_config;
|
*def_section = (struct section_config_t)default_section_config;
|
||||||
def_section->prev = prev;
|
if (def_section == NULL)
|
||||||
|
|
||||||
if (def_section == NULL)
|
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
def_section->prev = prev;
|
||||||
|
|
||||||
ret = parse_sni_domains(&def_section->sni_domains, default_snistr, sizeof(default_snistr));
|
ret = parse_sni_domains(&def_section->sni_domains, default_snistr, sizeof(default_snistr));
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
free(def_section);
|
free(def_section);
|
||||||
|
|||||||
Reference in New Issue
Block a user