mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-28 13:34:38 +08:00
4f04008038
In iavf_config_clsflower, the filter structure could be accidentally
released at the end, if iavf_parse_cls_flower or iavf_handle_tclass ever
return a non-zero but positive value.
In this case, the function continues through to the end, and will call
kfree() on the filter structure even though it has been added to the
linked list.
This can actually happen because iavf_parse_cls_flower will return
a positive IAVF_ERR_CONFIG value instead of the traditional negative
error codes.
Fix this by ensuring that the kfree() check and error checks are
similar. Use the more idiomatic "if (err)" to catch all non-zero error
codes.
Fixes:
|
||
---|---|---|
.. | ||
iavf_adminq_cmd.h | ||
iavf_adminq.c | ||
iavf_adminq.h | ||
iavf_adv_rss.c | ||
iavf_adv_rss.h | ||
iavf_alloc.h | ||
iavf_client.c | ||
iavf_client.h | ||
iavf_common.c | ||
iavf_devids.h | ||
iavf_ethtool.c | ||
iavf_fdir.c | ||
iavf_fdir.h | ||
iavf_main.c | ||
iavf_osdep.h | ||
iavf_prototype.h | ||
iavf_register.h | ||
iavf_status.h | ||
iavf_trace.h | ||
iavf_txrx.c | ||
iavf_txrx.h | ||
iavf_type.h | ||
iavf_virtchnl.c | ||
iavf.h | ||
Makefile |