• C
    net_sched: fix two more memory leaks in cls_tcindex · 1db817e7
    Cong Wang 提交于
    struct tcindex_filter_result contains two parts:
    struct tcf_exts and struct tcf_result.
    
    For the local variable 'cr', its exts part is never used but
    initialized without being released properly on success path. So
    just completely remove the exts part to fix this leak.
    
    For the local variable 'new_filter_result', it is never properly
    released if not used by 'r' on success path.
    
    Cc: Jamal Hadi Salim <jhs@mojatatu.com>
    Cc: Jiri Pirko <jiri@resnulli.us>
    Signed-off-by: NCong Wang <xiyou.wangcong@gmail.com>
    Signed-off-by: NDavid S. Miller <davem@davemloft.net>
    1db817e7
cls_tcindex.c 16.1 KB