Fix: a potential crash on failure to setlocale
authorlixiaokeng <lixiaokeng@huawei.com>
Wed, 16 Jun 2021 08:57:16 +0000 (16:57 +0800)
committerNikolaus Rath <Nikolaus@rath.org>
Wed, 16 Jun 2021 17:25:14 +0000 (18:25 +0100)
commita1e41676e34096abe21d202f4c4e440fd1257672
tree7c2ea1002710c4e11caafa4fc7ee1754db8c5b87
parent80f2b8b469d97349d87cfd59725cbc7c19959bf6
Fix: a potential crash on failure to setlocale

setlocale() can fail, returning NULL, which will lead
to a crash in iconv_new(). Fix it like in iconv_help().

Signed-off-by: Lixiaokeng <lixiaokeng@huawei.com>
lib/modules/iconv.c