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

Commit 38838605 authored by Mayank Rana's avatar Mayank Rana
Browse files

sound: usb: Fix memory corruption by using correct size



Commit 1efd15d0 ("sound: usb: Adopt new QMI framework related
changes") used wrong structure size while allocating memory
causing random memory corruption. Fix this issue by using correct
structure size.

Change-Id: I07019ad176f4cb6c5b5bcadce3e4df1a3f09219e
Signed-off-by: default avatarMayank Rana <mrana@codeaurora.org>
parent 5027ffca
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1231,7 +1231,7 @@ static int uaudio_qmi_svc_init(void)
		goto free_svc;
	}

	svc->uaudio_svc_hdl = kzalloc(sizeof(*svc), GFP_KERNEL);
	svc->uaudio_svc_hdl = kzalloc(sizeof(struct qmi_handle), GFP_KERNEL);
	if (!svc->uaudio_svc_hdl) {
		ret = -ENOMEM;
		goto destroy_uaudio_wq;