diff options
author | Brad King <brad.king@kitware.com> | 2016-06-21 17:57:07 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2016-06-21 17:57:07 (GMT) |
commit | 9cb685505ad86ecb560d1c71e7314f0ef98971f2 (patch) | |
tree | ea2e403c4e46efdeef82236a87a0c507a9ecd18d /Utilities/cmlibarchive/libarchive/archive_entry_xattr.c | |
parent | 447f0618db3325de1a57f8a5bf9f7dcc9a3a55ab (diff) | |
parent | 52f58267c311550db83f4a9430f378e730bd3d6b (diff) | |
download | CMake-9cb685505ad86ecb560d1c71e7314f0ef98971f2.zip CMake-9cb685505ad86ecb560d1c71e7314f0ef98971f2.tar.gz CMake-9cb685505ad86ecb560d1c71e7314f0ef98971f2.tar.bz2 |
Merge topic 'update-libarchive'
52f58267 Merge branch 'upstream-LibArchive' into update-libarchive
2b94d71d LibArchive 2016-06-19 (139d0576)
Diffstat (limited to 'Utilities/cmlibarchive/libarchive/archive_entry_xattr.c')
-rw-r--r-- | Utilities/cmlibarchive/libarchive/archive_entry_xattr.c | 9 |
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); |