lib/repo.c: fix CID 62783 correctly