mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 12:25:00 -04:00
netfilter: contrack: Null pointer check is added
Prior to null pointer check, SIP node was deleted from the list a null pointer check is added to confront the exception. Change-Id: Ia12fa468eed7d1a91fad96840fa27cb0e4e208a8 Acked-by: Vinisha Varre <vvarre@qti.qualcomm.com> Signed-off-by: Paras Singh Jain <parassin@codeaurora.org>
This commit is contained in:
parent
5f5ad727a8
commit
eb11987e63
1 changed files with 9 additions and 6 deletions
|
|
@ -647,12 +647,15 @@ destroy_conntrack(struct nf_conntrack *nfct)
|
|||
|
||||
#ifdef CONFIG_NF_CONNTRACK_SIP_SEGMENTATION
|
||||
pr_debug("freeing item in the SIP list\n");
|
||||
list_for_each_safe(sip_node_list, sip_node_save_list,
|
||||
&ct->sip_segment_list) {
|
||||
sip_node = list_entry(sip_node_list, struct sip_list, list);
|
||||
list_del(&sip_node->list);
|
||||
kfree(sip_node);
|
||||
}
|
||||
|
||||
if (ct->sip_segment_list.next)
|
||||
list_for_each_safe(sip_node_list, sip_node_save_list,
|
||||
&ct->sip_segment_list) {
|
||||
sip_node = list_entry(sip_node_list,
|
||||
struct sip_list, list);
|
||||
list_del(&sip_node->list);
|
||||
kfree(sip_node);
|
||||
}
|
||||
#endif
|
||||
/* Expectations will have been removed in clean_from_lists,
|
||||
* except TFTP can create an expectation on the first packet,
|
||||
|
|
|
|||
Loading…
Reference in a new issue