diff --git a/libisofs/aaip-os-freebsd.c b/libisofs/aaip-os-freebsd.c index e4ae344..8d00103 100644 --- a/libisofs/aaip-os-freebsd.c +++ b/libisofs/aaip-os-freebsd.c @@ -59,9 +59,9 @@ int aaip_get_acl_text(char *path, char **text, int flag) if(flag & (1 << 15)) { if(*text != NULL) #ifdef Libisofs_with_aaip_acL - acl_free(text); + acl_free(*text); #else - free(text); + free(*text); #endif *text= NULL; return(1); @@ -109,9 +109,9 @@ int aaip_get_acl_text(char *path, char **text, int flag) (*text)[0]= 0; if((*text)[0] == 0 || strcmp(*text, "\n") == 0) { #ifdef Libisofs_with_aaip_acL - acl_free(text); + acl_free(*text); #else - free(text); + free(*text); #endif *text= NULL; return(2); diff --git a/libisofs/aaip-os-linux.c b/libisofs/aaip-os-linux.c index 493d8ee..6296846 100644 --- a/libisofs/aaip-os-linux.c +++ b/libisofs/aaip-os-linux.c @@ -60,7 +60,7 @@ int aaip_get_acl_text(char *path, char **text, int flag) if(flag & (1 << 15)) { if(*text != NULL) - acl_free(text); + acl_free(*text); *text= NULL; return(1); } @@ -93,7 +93,7 @@ int aaip_get_acl_text(char *path, char **text, int flag) } if(flag & (1 | 16)) { if((*text)[0] == 0 || strcmp(*text, "\n") == 0) { - acl_free(text); + acl_free(*text); *text= NULL; return(2); }