netlabel: Fix a potential NULL pointer dereference