From d5535ac1473e11a6dd01fdc487cce2c0761c77d0 Mon Sep 17 00:00:00 2001 From: Frank Lahm Date: Wed, 24 Nov 2010 09:55:31 +0100 Subject: [PATCH] Better error handling in case of bogus CNIDs --- bin/ad/ad_find.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/ad/ad_find.c b/bin/ad/ad_find.c index a233b9ad..9891b14c 100644 --- a/bin/ad/ad_find.c +++ b/bin/ad/ad_find.c @@ -138,14 +138,16 @@ int ad_find(int argc, char **argv) while (did != DIRDID_ROOT) { if ((name = cnid_resolve(vol.volume.v_cdb, &did, buffer, buflen)) == NULL) - ERROR("Can't resolve CNID: %u", ntohl(did)); + goto next; bstrListPush(pathlist, bfromcstr(name)); } bstrListPush(pathlist, volpath); path = bjoinInv(pathlist, sep); - bstrListDestroy(pathlist); printf("%s\n", cfrombstr(path)); + + next: + bstrListDestroy(pathlist); bdestroy(path); } bdestroy(sep); -- 2.39.2