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

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

Merge "msm: ADSPRPC: Fix leak that happens while the list gets empty"

parents c2380d54 3b1e08e4
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -1872,8 +1872,10 @@ static int fastrpc_device_release(struct inode *inode, struct file *file)
		file->private_data = 0;
	}
bail:
	if (err)
	if (err) {
		fastrpc_file_free(fl);
		kfree(pfl);
	}
	return err;
}

@@ -1892,8 +1894,10 @@ static void file_free_work_handler(struct work_struct *w)
			break;
		}
		mutex_unlock(&me->flfree_mutex);
		if (freefl)
		if (freefl) {
			fastrpc_file_free(freefl->fl);
			kfree(freefl);
		}
		mutex_lock(&me->flfree_mutex);

		if (hlist_empty(&me->fls)) {
@@ -1903,7 +1907,6 @@ static void file_free_work_handler(struct work_struct *w)
			break;
		}
		mutex_unlock(&me->flfree_mutex);
		kfree(freefl);
	}
	return;
}