diff options
author | David Li <dvdli@google.com> | 2022-05-12 14:11:24 +0000 |
---|---|---|
committer | David Li <dvdli@google.com> | 2022-05-12 14:11:24 +0000 |
commit | e5fc2886e1dd802284879401441fc046c50146e7 (patch) | |
tree | d19ba1fb758efc21ee23bd78a15fccde67207216 | |
parent | 61bf563f1df205cf14df142721aaafb854bbbd82 (diff) | |
download | tinyalsa-e5fc2886e1dd802284879401441fc046c50146e7.tar.gz |
add null check for name in mixer_get_ctl_by_name
Bug: 180934608
Test: mm libtinyalsa
Change-Id: Ia245ef3dbe42c897f13b53b52719440e9c89c969
-rw-r--r-- | mixer.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -388,7 +388,7 @@ struct mixer_ctl *mixer_get_ctl_by_name(struct mixer *mixer, const char *name) unsigned int n; int hw_ctl_count; - if (!mixer) + if (!mixer || !name) return NULL; hw_ctl_count = mixer_grp_get_count(mixer->hw_grp); |