Merge "soc: Add proper null check for client array pointer"

This commit is contained in:
Linux Build Service Account 2018-10-23 01:32:56 -07:00 committed by Gerrit - the friendly Code Review server
commit c8d4438836

View File

@ -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;