diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index ab293a3066b34bc4f6af71701f0c12b9ab6e5a34..1385de0fa0809828dd4467386c902ef2e718dcae 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -2012,8 +2012,8 @@ static int rtnl_newlink(struct sk_buff *skb, struct nlmsghdr *nlh)
 	}
 
 	if (1) {
-		struct nlattr *attr[ops ? ops->maxtype + 1 : 0];
-		struct nlattr *slave_attr[m_ops ? m_ops->slave_maxtype + 1 : 0];
+		struct nlattr *attr[ops ? ops->maxtype + 1 : 1];
+		struct nlattr *slave_attr[m_ops ? m_ops->slave_maxtype + 1 : 1];
 		struct nlattr **data = NULL;
 		struct nlattr **slave_data = NULL;
 		struct net *dest_net, *link_net = NULL;