From 355f1f7ea2ec3f882234d577ea67dc7a28956865 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Tue, 13 Oct 2015 14:40:42 +0200 Subject: [PATCH] Avoided to have an unused variable with --disable-xattr. Coverity CID 12544. --- libisofs/aaip-os-linux.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libisofs/aaip-os-linux.c b/libisofs/aaip-os-linux.c index b3bbf33..65630d1 100644 --- a/libisofs/aaip-os-linux.c +++ b/libisofs/aaip-os-linux.c @@ -461,8 +461,9 @@ int aaip_set_attr_list(char *path, size_t num_attrs, char **names, { int ret; size_t i, consumed, acl_text_fill, acl_idx= 0; - char *acl_text= NULL, *list= NULL; + char *acl_text= NULL; #ifdef Libisofs_with_aaip_xattR + char *list= NULL; ssize_t list_size= 0; #endif #ifdef Libisofs_with_aaip_acL @@ -611,8 +612,12 @@ int aaip_set_attr_list(char *path, size_t num_attrs, char **names, ex:; if(acl_text != NULL) free(acl_text); + +#ifdef Libisofs_with_aaip_xattR if(list != NULL) free(list); +#endif + return(ret); }