Merge "BUGFIX: libnl_2"

This commit is contained in:
Frank Maker 2011-07-01 15:30:16 -07:00 committed by Android (Google) Code Review
commit 5744d312c8
1 changed files with 4 additions and 2 deletions

View File

@ -154,10 +154,12 @@ int nla_put(struct nl_msg *msg, int attrtype, int datalen, const void *data)
/* Reserve space and init nla header */
nla = nla_reserve(msg, attrtype, datalen);
if (nla)
if (nla) {
memcpy(nla_data(nla), data, datalen);
return 0;
}
return -errno;
return -EINVAL;
}