]> arthur.barton.de Git - netatalk.git/commitdiff
Better error handling in case of bogus CNIDs
authorFrank Lahm <franklahm@googlemail.com>
Wed, 24 Nov 2010 08:55:31 +0000 (09:55 +0100)
committerFrank Lahm <franklahm@googlemail.com>
Wed, 24 Nov 2010 08:55:31 +0000 (09:55 +0100)
bin/ad/ad_find.c

index a233b9adf51385a05ed532f60c7780bffb30cb70..9891b14c742cf199adec486ebf53d271d74f5cee 100644 (file)
@@ -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);