From 13bebcc1ecba3d0d187168d5c321d4bbdd3a898e Mon Sep 17 00:00:00 2001 From: Frank Lahm Date: Tue, 1 Jan 2013 21:57:58 +0100 Subject: [PATCH] Fix for adflags --- etc/afpd/file.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/etc/afpd/file.c b/etc/afpd/file.c index 963268fe..e33b0e3a 100644 --- a/etc/afpd/file.c +++ b/etc/afpd/file.c @@ -604,7 +604,7 @@ int getfilparams(const AFPObj *obj, struct vol *vol, uint16_t bitmap, struct pat struct adouble ad, *adp; int opened = 0; int rc; - int flags; + int flags; /* uninitialized ok */ LOG(log_debug, logtype_afpd, "getfilparams(\"%s\")", path->u_name); @@ -640,7 +640,9 @@ int getfilparams(const AFPObj *obj, struct vol *vol, uint16_t bitmap, struct pat } } rc = getmetadata(obj, vol, bitmap, path, dir, buf, buflen, adp); - ad_close(adp, ADFLAGS_HF | flags); + + if (opened) + ad_close(adp, ADFLAGS_HF | flags); return( rc ); } -- 2.39.2