mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
staging: unisys: visorutil: Remove null check before kfree
This patch was generated by the following semantic patch: // <smpl> @@ expression E; @@ - if (E != NULL) { kfree(E); } + kfree(E); @@ expression E; @@ - if (E != NULL) { kfree(E); E = NULL; } + kfree(E); + E = NULL; // </smpl> Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
029bf13814
commit
8d02c02253
@ -320,19 +320,18 @@ void visor_proc_DestroyObject(MYPROCOBJECT *obj)
|
||||
kfree(obj->procDirProperties);
|
||||
obj->procDirProperties = NULL;
|
||||
}
|
||||
if (obj->procDirPropertyContexts != NULL) {
|
||||
kfree(obj->procDirPropertyContexts);
|
||||
obj->procDirPropertyContexts = NULL;
|
||||
}
|
||||
|
||||
kfree(obj->procDirPropertyContexts);
|
||||
obj->procDirPropertyContexts = NULL;
|
||||
|
||||
if (obj->procDir != NULL) {
|
||||
if (obj->name != NULL)
|
||||
remove_proc_entry(obj->name, type->procDir);
|
||||
obj->procDir = NULL;
|
||||
}
|
||||
if (obj->name != NULL) {
|
||||
kfree(obj->name);
|
||||
obj->name = NULL;
|
||||
}
|
||||
|
||||
kfree(obj->name);
|
||||
obj->name = NULL;
|
||||
kfree(obj);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(visor_proc_DestroyObject);
|
||||
|
Loading…
Reference in New Issue
Block a user