]> arthur.barton.de Git - netatalk.git/commitdiff
Fix PR3075391, a ressource leak
authorFrank Lahm <franklahm@googlemail.com>
Thu, 14 Oct 2010 10:02:25 +0000 (12:02 +0200)
committerFrank Lahm <franklahm@googlemail.com>
Thu, 14 Oct 2010 10:02:25 +0000 (12:02 +0200)
etc/afpd/directory.c

index cadcdb025b168366920c02a986a2570154da763d..813fb05475ccec50cc9e40dda06ebac3a5bf2b06 100644 (file)
@@ -575,10 +575,10 @@ struct dir *dirlookup(const struct vol *vol, cnid_t did)
         ntohl(did), ntohl(pdid), cfrombstr(ret->d_fullpath));
 
 exit:
+    if (upath) free(upath);
     if (err) {
         LOG(log_debug, logtype_afpd, "dirlookup(did: %u) {exit_error: %s}",
             ntohl(did), AfpErr2name(afp_errno));
-        free(upath);
         if (fullpath)
             bdestroy(fullpath);
         if (ret) {