diff options
author | Brad King <brad.king@kitware.com> | 2015-10-21 14:12:35 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-10-21 14:18:52 (GMT) |
commit | 932848f420a738ee07997198fead5b2c2fbf4787 (patch) | |
tree | 40404c3244ba87c5e71e8dd076f4dbcde6d8cfeb /Utilities/cmlibarchive/libarchive/archive_write_open_filename.c | |
parent | e4b7d5afde91efafb59749a0a513732a089a6f0a (diff) | |
parent | 1a8c7bc2c649781d1163c1966245a45e0fb829ba (diff) | |
download | CMake-932848f420a738ee07997198fead5b2c2fbf4787.zip CMake-932848f420a738ee07997198fead5b2c2fbf4787.tar.gz CMake-932848f420a738ee07997198fead5b2c2fbf4787.tar.bz2 |
Merge branch 'libarchive-upstream' into update-libarchive
Resolve conflicts by integrating changes from both sides.
Diffstat (limited to 'Utilities/cmlibarchive/libarchive/archive_write_open_filename.c')
-rw-r--r-- | Utilities/cmlibarchive/libarchive/archive_write_open_filename.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Utilities/cmlibarchive/libarchive/archive_write_open_filename.c b/Utilities/cmlibarchive/libarchive/archive_write_open_filename.c index 196b770..66e0dfe 100644 --- a/Utilities/cmlibarchive/libarchive/archive_write_open_filename.c +++ b/Utilities/cmlibarchive/libarchive/archive_write_open_filename.c @@ -243,7 +243,10 @@ file_close(struct archive *a, void *client_data) struct write_file_data *mine = (struct write_file_data *)client_data; (void)a; /* UNUSED */ - close(mine->fd); + + if (mine->fd >= 0) + close(mine->fd); + archive_mstring_clean(&mine->filename); free(mine); return (ARCHIVE_OK); |