X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=netatalk.git;a=blobdiff_plain;f=bin%2Fad%2Fad_util.c;h=7d4d2fb9e832fbb009fccb9a5b17588a73360076;hp=135bf7abdc83b1be94e8b419f3de6e0cf46fa00c;hb=4021b76ce3f3e51756e9d59b4a5a045ad6398dc8;hpb=53d18835cae017adc2051868fe5b3063f086edae diff --git a/bin/ad/ad_util.c b/bin/ad/ad_util.c index 135bf7ab..7d4d2fb9 100644 --- a/bin/ad/ad_util.c +++ b/bin/ad/ad_util.c @@ -51,6 +51,9 @@ #ifdef HAVE_SOLARIS_ACLS #include #endif /* HAVE_SOLARIS_ACLS */ +#ifdef HAVE_FREEBSD_SUNACL +#include +#endif #ifdef HAVE_POSIX_ACLS #include @@ -138,9 +141,11 @@ int openvol(AFPObj *obj, const char *path, afpvol_t *vol) void closevol(afpvol_t *vol) { - if (vol->vol->v_cdb) { - cnid_close(vol->vol->v_cdb); - vol->vol->v_cdb = NULL; + if (vol->vol) { + if (vol->vol->v_cdb) { + cnid_close(vol->vol->v_cdb); + vol->vol->v_cdb = NULL; + } } memset(vol, 0, sizeof(afpvol_t)); }