copy label name in dev_add()

This commit is contained in:
Alexandre Ratchov 2015-08-26 12:22:06 +02:00
parent 9ff8e621d0
commit 293133ebdf
1 changed files with 2 additions and 1 deletions

View File

@ -2099,7 +2099,8 @@ dev_addctl(struct dev *d, int type, int addr,
strlcpy(c->func, func, CTL_NAMEMAX);
strlcpy(c->chan0.str, str0, CTL_NAMEMAX);
strlcpy(c->chan0.opt, opt0, CTL_NAMEMAX);
if (c->type == CTL_VEC ||
if (c->type == CTL_LABEL ||
c->type == CTL_VEC ||
c->type == CTL_LIST) {
strlcpy(c->chan1.str, str1, CTL_NAMEMAX);
strlcpy(c->chan1.opt, opt1, CTL_NAMEMAX);