In the Linux kernel, the following vulnerability has been resolved: rocker: fix memory leak in rockerworldportpostfini() In rockerworldportpreinit(), rockerport->wpriv is allocated with kzalloc(wops->portprivsize, GFPKERNEL). However, in rockerworldportpostfini(), the memory is only freed when wops->portpostfini callback is set: if (!wops->portpostfini) return; wops->portpostfini(rockerport); kfree(rockerport->wpriv); Since rockerofdpaops does not implement portpostfini callback (it is NULL), the wpriv memory allocated for each port is never freed when ports are removed. This leads to a memory leak of sizeof(struct ofdpaport) bytes per port on every device removal. Fix this by always calling kfree(rockerport->wpriv) regardless of whether the portpostfini callback exists.