]> arthur.barton.de Git - netatalk.git/blobdiff - etc/afpd/file.c
afpd/file: fix memory leak
[netatalk.git] / etc / afpd / file.c
index f62e05eeb7f52bd6cc5b10e787559aedf8e152e1..e48afe213896e67c0595bad9027b2d647b688c6e 100644 (file)
@@ -92,6 +92,7 @@ void *get_finderinfo(const struct vol *vol, const char *upath, struct adouble *a
     }
     else {
         memcpy(data, ufinderi, ADEDLEN_FINDERI);
+        chk_ext = 1;
         if (vol_inv_dots(vol) && *upath == '.') { /* make it invisible */
             uint16_t ashort;
             
@@ -334,6 +335,7 @@ int getmetadata(const AFPObj *obj,
                     || (bconchar(fullpath, '/') != BSTR_OK)
                     || (bcatcstr(fullpath, upath)) != BSTR_OK) {
                     LOG(log_error, logtype_afpd, "getmetadata: fullpath: %s", strerror(errno));
+                    bdestroy(fullpath);
                     return AFPERR_MISC;
                 }