kmodloader: fix open() error handling
authorJo-Philipp Wich <jow@openwrt.org>
Tue, 9 Feb 2016 07:53:28 +0000 (08:53 +0100)
committerJo-Philipp Wich <jow@openwrt.org>
Tue, 9 Feb 2016 07:53:31 +0000 (08:53 +0100)
commitb0d5399c3db83c2c8f9d8aae944f873343b3a038
treee0757ea78fee9684e66baf3bb7f04af00dd8db2e
parent31d66f2c3b2afbc9eaae4e2c22103d0f79e9503e
kmodloader: fix open() error handling

Fixes kmodloader on systems without stdio and prevents fd leaks in case
descriptor zero is opened.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
kmodloader.c