From be2c3142f9a76ae1f036fc4316ff425f6455ce3a Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Fri, 20 Dec 2013 08:25:13 -0800 Subject: [PATCH] veth: fix uninitialized arguments Based on patch by Sergey Popovich This fixes crash when ip-link(8) invoced with command: ip link add dev veth1a type veth peer --- ip/link_veth.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ip/link_veth.c b/ip/link_veth.c index 7730f3941..f357182f0 100644 --- a/ip/link_veth.c +++ b/ip/link_veth.c @@ -26,7 +26,10 @@ static void usage(void) static int veth_parse_opt(struct link_util *lu, int argc, char **argv, struct nlmsghdr *hdr) { - char *name, *type, *link, *dev; + char *dev = NULL; + char *name = NULL; + char *link = NULL; + char *type = NULL; int err, len; struct rtattr * data; int group; -- 2.47.2