forked from github/server
null-pointer check befor strcmp.
This commit is contained in:
parent
12117776a0
commit
061cadfce8
|
@ -565,8 +565,8 @@ int autoseed(newfaction ** players, int nsize, int max_agediff)
|
||||||
nfp = &nextf->next;
|
nfp = &nextf->next;
|
||||||
while (*nfp) {
|
while (*nfp) {
|
||||||
newfaction *nf = *nfp;
|
newfaction *nf = *nfp;
|
||||||
if (strcmp(nextf->email, nf->email) == 0) {
|
if (nf->email && nextf->email && strcmp(nextf->email, nf->email) == 0) {
|
||||||
log_warning("Duplicate email %s\n", nf->email?nf->email:"");
|
log_warning("Duplicate email %s\n", nf->email ? nf->email : "");
|
||||||
*nfp = nf->next;
|
*nfp = nf->next;
|
||||||
free_newfaction(nf);
|
free_newfaction(nf);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue