Commit 10ae8f4e authored by zhong jiang's avatar zhong jiang Committed by David S. Miller

ixgbe: Use kzfree() rather than its implementation.

Use kzfree() instead of memset() + kfree().
Signed-off-by: default avatarzhong jiang <zhongjiang@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b06b3992
...@@ -960,11 +960,9 @@ int ixgbe_ipsec_vf_add_sa(struct ixgbe_adapter *adapter, u32 *msgbuf, u32 vf) ...@@ -960,11 +960,9 @@ int ixgbe_ipsec_vf_add_sa(struct ixgbe_adapter *adapter, u32 *msgbuf, u32 vf)
return 0; return 0;
err_aead: err_aead:
memset(xs->aead, 0, sizeof(*xs->aead)); kzfree(xs->aead);
kfree(xs->aead);
err_xs: err_xs:
memset(xs, 0, sizeof(*xs)); kzfree(xs);
kfree(xs);
err_out: err_out:
msgbuf[1] = err; msgbuf[1] = err;
return err; return err;
...@@ -1049,8 +1047,7 @@ int ixgbe_ipsec_vf_del_sa(struct ixgbe_adapter *adapter, u32 *msgbuf, u32 vf) ...@@ -1049,8 +1047,7 @@ int ixgbe_ipsec_vf_del_sa(struct ixgbe_adapter *adapter, u32 *msgbuf, u32 vf)
ixgbe_ipsec_del_sa(xs); ixgbe_ipsec_del_sa(xs);
/* remove the xs that was made-up in the add request */ /* remove the xs that was made-up in the add request */
memset(xs, 0, sizeof(*xs)); kzfree(xs);
kfree(xs);
return 0; return 0;
} }
......
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