Skip to content

Commit cb05d2a

Browse files
committed
busctl: add missing oom check
1 parent 9bb31a0 commit cb05d2a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/busctl/busctl.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,9 @@ static int list_bus_names(int argc, char **argv, void *userdata) {
190190
}
191191

192192
merged = new(char*, hashmap_size(names) + 1);
193+
if (!merged)
194+
return log_oom();
195+
193196
HASHMAP_FOREACH_KEY(v, k, names, iterator)
194197
merged[n++] = k;
195198

0 commit comments

Comments
 (0)