1
0
mirror of https://github.com/nmap/nmap.git synced 2026-02-14 09:26:35 +00:00

Return NULL in reason_sort() if tail is NULL as it's possible tail never gets redefined. I think that's better than an assert(tail). Found with Coverity, CID 24

This commit is contained in:
kris
2007-11-16 01:26:42 +00:00
parent fe63809293
commit 6ce9d03d8a

View File

@@ -214,7 +214,9 @@ static state_reason_summary_t *reason_sort(state_reason_summary_t *list) {
}
p = q;
}
tail->next = NULL;
if (!tail)
return NULL;
tail->next = NULL;
if (nmerges <= 1)
return list;
insize *= 2;