Commit cea14e94 authored by Hangyu Hua's avatar Hangyu Hua Committed by zhaoxiaoqiang11
Browse files

net: openvswitch: fix possible memory leak in ovs_meter_cmd_set()

stable inclusion
from stable-v5.10.169
commit c0f65ee0a3329eb4b94beaef0268633696e2d0c6
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I7V9QX

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=c0f65ee0a3329eb4b94beaef0268633696e2d0c6



----------------------------------------------------

commit 2fa28f5c upstream.

old_meter needs to be free after it is detached regardless of whether
the new meter is successfully attached.

Fixes: c7c4c44c ("net: openvswitch: expand the meters supported number")
Signed-off-by: default avatarHangyu Hua <hbh25y@gmail.com>
Acked-by: default avatarEelco Chaudron <echaudro@redhat.com>
Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarzhaoxiaoqiang11 <zhaoxiaoqiang11@jd.com>
parent d1bfb9fc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment