Merge "soc: Add proper null check for client array pointer"
This commit is contained in:
commit
c8d4438836
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user