mirror of
https://github.com/systemd/systemd
synced 2024-09-16 06:43:18 +00:00
busctl: add missing oom check
This commit is contained in:
parent
9bb31a0c9f
commit
cb05d2a514
|
@ -190,6 +190,9 @@ static int list_bus_names(int argc, char **argv, void *userdata) {
|
|||
}
|
||||
|
||||
merged = new(char*, hashmap_size(names) + 1);
|
||||
if (!merged)
|
||||
return log_oom();
|
||||
|
||||
HASHMAP_FOREACH_KEY(v, k, names, iterator)
|
||||
merged[n++] = k;
|
||||
|
||||
|
|
Loading…
Reference in a new issue