add-remove-shell: fix crash when shell is already added
authorTimo Teräs <timo.teras@iki.fi>
Fri, 14 Jul 2017 07:59:52 +0000 (09:59 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Fri, 14 Jul 2017 07:59:52 +0000 (09:59 +0200)
commitcc86b2ad965bff071185edbb77b5a6ea45023e43
tree5c0d8effa582b85170875cd538eed63090290a59
parenta2bdc5c55485b054088513083ca0c78ce11445a9
add-remove-shell: fix crash when shell is already added

Avoid dereferencing 'don_add' in strcmp since it is invalid
pointer.

Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
loginutils/add-remove-shell.c