From: Frank Lahm Date: Wed, 24 Nov 2010 08:55:31 +0000 (+0100) Subject: Better error handling in case of bogus CNIDs X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=netatalk.git;a=commitdiff_plain;h=d5535ac1473e11a6dd01fdc487cce2c0761c77d0 Better error handling in case of bogus CNIDs --- 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);