aboutsummaryrefslogtreecommitdiffstats
path: root/libarchive/test/test_xattr_platform.c
diff options
context:
space:
mode:
Diffstat (limited to 'libarchive/test/test_xattr_platform.c')
-rw-r--r--libarchive/test/test_xattr_platform.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libarchive/test/test_xattr_platform.c b/libarchive/test/test_xattr_platform.c
index ebb265edb382..df3f81a5b3fd 100644
--- a/libarchive/test/test_xattr_platform.c
+++ b/libarchive/test/test_xattr_platform.c
@@ -35,6 +35,7 @@ DEFINE_TEST(test_xattr_platform)
struct archive_entry *ae;
const char *name;
const void *value;
+ void *rvalue;
size_t size, insize;
int e, r;
const char *attrname = "user.libarchive.test";
@@ -95,8 +96,9 @@ DEFINE_TEST(test_xattr_platform)
assertEqualIntA(a, ARCHIVE_OK, archive_write_close(a));
assertEqualInt(ARCHIVE_OK, archive_write_free(a));
- value = getXattr("writetest", attrname, &insize);
+ rvalue = getXattr("writetest", attrname, &insize);
if (assertEqualInt(insize, strlen(writeval) + 1) != 0)
- assertEqualMem(value, writeval, insize);
+ assertEqualMem(rvalue, writeval, insize);
+ free(rvalue);
#endif
}