Commit b9f81057 authored by Stanislav Fomichev's avatar Stanislav Fomichev Committed by Trond Myklebust

nfs: add kmalloc return value check in decode_and_add_ds

add kmalloc return value check in decode_and_add_ds
Signed-off-by: default avatarStanislav Fomichev <kernel@fomichev.me>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent a5e50268
......@@ -219,6 +219,10 @@ decode_and_add_ds(__be32 **pp, struct inode *inode)
goto out_err;
}
buf = kmalloc(rlen + 1, GFP_KERNEL);
if (!buf) {
dprintk("%s: Not enough memory\n", __func__);
goto out_err;
}
buf[rlen] = '\0';
memcpy(buf, r_addr, rlen);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment