net: remove the unnecessary check in cipso_v4_doi_free
The commit733c99ee8b
("net: fix NULL pointer reference in cipso_v4_doi_free") was merged by a mistake, this patch try to cleanup the mess. And we already have the commite842cb60e8
("net: fix NULL pointer reference in cipso_v4_doi_free") which fixed the root cause of the issue mentioned in it's description. Suggested-by: Paul Moore <paul@paul-moore.com> Signed-off-by: Michael Wang <yun.wang@linux.alibaba.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
ddd0d52938
commit
9756e44fd4
|
@ -465,7 +465,6 @@ void cipso_v4_doi_free(struct cipso_v4_doi *doi_def)
|
|||
if (!doi_def)
|
||||
return;
|
||||
|
||||
if (doi_def->map.std) {
|
||||
switch (doi_def->type) {
|
||||
case CIPSO_V4_MAP_TRANS:
|
||||
kfree(doi_def->map.std->lvl.cipso);
|
||||
|
@ -475,7 +474,6 @@ void cipso_v4_doi_free(struct cipso_v4_doi *doi_def)
|
|||
kfree(doi_def->map.std);
|
||||
break;
|
||||
}
|
||||
}
|
||||
kfree(doi_def);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue