Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8e57beea authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "drivers: core: Fix use-after-free and double free on glue_dirs"

parents 5f01b020 ac4bcdb2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -867,7 +867,7 @@ static void cleanup_glue_dir(struct device *dev, struct kobject *glue_dir)
		return;

	mutex_lock(&gdp_mutex);
	if (!kobject_has_children(glue_dir))
	if (!kobject_has_children(glue_dir) && atomic_read(&glue_dir->kref.refcount) == 1)
		kobject_del(glue_dir);
	kobject_put(glue_dir);
	mutex_unlock(&gdp_mutex);