mirror of
https://github.com/Waujito/youtubeUnblock.git
synced 2025-12-06 03:26:45 +03:00
fix: проверка указателя до его использования
This commit is contained in:
@@ -120,10 +120,10 @@ static int parse_sni_domains(struct domains_list **dlist, const char *domains_st
|
||||
unsigned int domain_len = (i - j);
|
||||
const char *domain_startp = domains_str + j;
|
||||
struct domains_list *edomain = malloc(sizeof(struct domains_list));
|
||||
*edomain = (struct domains_list){0};
|
||||
if (edomain == NULL) {
|
||||
return -ENOMEM;
|
||||
}
|
||||
*edomain = (struct domains_list){0};
|
||||
|
||||
edomain->domain_len = domain_len;
|
||||
edomain->domain_name = malloc(domain_len + 1);
|
||||
|
||||
Reference in New Issue
Block a user