summaryrefslogtreecommitdiffstats
path: root/Utilities/cmlibarchive/libarchive/archive_entry_xattr.c
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-06-20 14:53:25 (GMT)
committerBrad King <brad.king@kitware.com>2016-06-20 14:53:25 (GMT)
commitd38fc22132db1b82fad1ef5b8a7f5e030c71a90f (patch)
treefb362cbe51d7efb0d6e3af8cfc8459e4a7104844 /Utilities/cmlibarchive/libarchive/archive_entry_xattr.c
parentc8f139a16bd1b233c35ef0bcb2cbed3f8acbb9cb (diff)
parent52f58267c311550db83f4a9430f378e730bd3d6b (diff)
downloadCMake-d38fc22132db1b82fad1ef5b8a7f5e030c71a90f.zip
CMake-d38fc22132db1b82fad1ef5b8a7f5e030c71a90f.tar.gz
CMake-d38fc22132db1b82fad1ef5b8a7f5e030c71a90f.tar.bz2
Merge branch 'update-libarchive' into release
Diffstat (limited to 'Utilities/cmlibarchive/libarchive/archive_entry_xattr.c')
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_entry_xattr.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/Utilities/cmlibarchive/libarchive/archive_entry_xattr.c b/Utilities/cmlibarchive/libarchive/archive_entry_xattr.c
index 05eb90f..5fe726b 100644
--- a/Utilities/cmlibarchive/libarchive/archive_entry_xattr.c
+++ b/Utilities/cmlibarchive/libarchive/archive_entry_xattr.c
@@ -91,16 +91,11 @@ archive_entry_xattr_add_entry(struct archive_entry *entry,
{
struct ae_xattr *xp;
- for (xp = entry->xattr_head; xp != NULL; xp = xp->next)
- ;
-
if ((xp = (struct ae_xattr *)malloc(sizeof(struct ae_xattr))) == NULL)
- /* XXX Error XXX */
- return;
+ __archive_errx(1, "Out of memory");
if ((xp->name = strdup(name)) == NULL)
- /* XXX Error XXX */
- return;
+ __archive_errx(1, "Out of memory");
if ((xp->value = malloc(size)) != NULL) {
memcpy(xp->value, value, size);