drm: fix memory leak around mode_group (v2)
This mode group id_list was never being freed. v2: take David's suggestion to free in minor_free. Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
@@ -294,6 +294,7 @@ static void drm_minor_free(struct drm_device *dev, unsigned int type)
|
||||
|
||||
slot = drm_minor_get_slot(dev, type);
|
||||
if (*slot) {
|
||||
drm_mode_group_destroy(&(*slot)->mode_group);
|
||||
kfree(*slot);
|
||||
*slot = NULL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user