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

Commit d7a63903 authored by Tanya Dixit's avatar Tanya Dixit
Browse files

soc: Add proper null check for client array pointer



Check if snd event client array is null before
dereferencing.

CRs-Fixed: 2328286
Change-Id: I4f7c2a1288ee27df51609e090cb2da2d33624a07
Signed-off-by: default avatarTanya Dixit <tdixit@codeaurora.org>
parent 0f702585
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -301,6 +301,10 @@ void snd_event_mstr_add_client(struct snd_event_clients **snd_clients,
		}
		client->cl_arr = kzalloc(sizeof(struct snd_event_client_array),
					 GFP_KERNEL);
		if (!client->cl_arr) {
			*snd_clients = ERR_PTR(-ENOMEM);
			return;
		}
		*snd_clients = client;
	} else {
		struct snd_event_client_array *new;