In the Linux kernel, the following vulnerability has been resolved:
EDAC/versalnet: Fix device name memory leak
The device name allocated via kzalloc() in initonemc() is assigned to dev->initname but never freed on the normal removal path. deviceregister() copies initname and then sets dev->initname to NULL, so the name pointer becomes unreachable from the device. Thus leaking memory.
Use a stack-local char array instead of using kzalloc() for name.
In the Linux kernel, the following vulnerability has been resolved:
EDAC/versalnet: Fix devicenode leak in mcprobe()
ofparsephandle() returns a devicenode reference that must be released with ofnodeput(). The original code never freed r5corenode on any exit path, causing a memory leak.
Fix this by using the automatic cleanup attribute free(devicenode) which ensures ofnodeput() is called when the variable goes out of scope.