diff options
author | Lennart Poettering <lennart@poettering.net> | 2014-08-15 15:34:56 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2014-08-15 15:34:56 +0200 |
commit | 1405434b6986d3c3d6ccaaa2e472bad843cbbfa1 (patch) | |
tree | 45cdacb14e71f57c3aa48bfbb703cc2a0c0887c2 | |
parent | 31d2e1961aa05f1204090792e2acc27103de5bfd (diff) |
networkctl: two OOM fixes
-rw-r--r-- | src/network/networkctl.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/network/networkctl.c b/src/network/networkctl.c index bf95aa2c90..8f2c1b3975 100644 --- a/src/network/networkctl.c +++ b/src/network/networkctl.c @@ -371,7 +371,11 @@ static int link_status_one(sd_rtnl *rtnl, struct udev *udev, const char *name) { char *wildcard; wildcard = strdup("*"); - strv_push(&domains, wildcard); + if (!wildcard) + return log_oom(); + + if (strv_consume(&domains, wildcard) < 0) + return log_oom(); } sprintf(devid, "n%i", ifindex); |