units: fix bugs in reporting valgrind error

Signed-off-by: Masatake YAMATO <yamato@redhat.com>