From bb28c69cae52f22658631334fffea098437d84f3 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Tue, 5 Oct 2010 19:58:54 +0200 Subject: [PATCH] Stuffed a memory leak discovered by valgrind. --- libisofs/aaip-os-linux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libisofs/aaip-os-linux.c b/libisofs/aaip-os-linux.c index 5b57760..9928e7a 100644 --- a/libisofs/aaip-os-linux.c +++ b/libisofs/aaip-os-linux.c @@ -295,9 +295,9 @@ ex:; aaip_get_acl_text("", &a_acl_text, 1 << 15); /* free */ if(d_acl_text != NULL) aaip_get_acl_text("", &d_acl_text, 1 << 15); /* free */ + if(list != NULL) + free(list); if(ret <= 0 || (flag & (1 << 15))) { - if(list != NULL) - free(list); if(*names != NULL) { for(i= 0; i < *num_attrs; i++) free((*names)[i]);