summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-08-15 15:34:56 +0200
committerLennart Poettering <lennart@poettering.net>2014-08-15 15:34:56 +0200
commit1405434b6986d3c3d6ccaaa2e472bad843cbbfa1 (patch)
tree45cdacb14e71f57c3aa48bfbb703cc2a0c0887c2
parent31d2e1961aa05f1204090792e2acc27103de5bfd (diff)
networkctl: two OOM fixes
-rw-r--r--src/network/networkctl.c6
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);