opkg: fix nullpointer dereference