userdbctl: avoid NULL pointer deref
Error from uid_range_load_userns is ignored, so 'p' could be NULL.
This commit is contained in:
@@ -310,6 +310,9 @@ static int table_add_uid_map(
|
||||
assert(table);
|
||||
assert(add_unavailable);
|
||||
|
||||
if (!p)
|
||||
return 0;
|
||||
|
||||
for (size_t i = 0; p && i < p->n_entries; i++) {
|
||||
UIDRangeEntry *x = p->entries + i;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user