pppd/plugins/radius/clientid.c: handle strdup failure (#507)

Signed-off-by: Ilya Shipitsin <chipitsine@gmail.com>
This commit is contained in:
Ilya Shipitsin 2024-08-17 05:41:13 +02:00 committed by GitHub
parent cb593953b5
commit fa612cba71
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -72,7 +72,11 @@ int rc_read_mapfile(char *filename)
return (-1);
}
p->name = strdup(name);
if ((p->name = strdup(name)) == NULL) {
novm("rc_read_mapfile");
fclose(mapfd);
return (-1);
}
p->id = atoi(id);
p->next = map2id_list;
map2id_list = p;