dont write NULL return values when *_main fails

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>