hardlink.c: Fix some error paths