diff options
author | ed <ed@FreeBSD.org> | 2009-06-14 09:23:33 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2009-06-14 09:23:33 +0000 |
commit | db89e312d968c258aba3c79c1c398f5fb19267a3 (patch) | |
tree | 49817b316c4fdaa56d9d16ebf2555303d1a990e0 /lib/Archive/ArchiveWriter.cpp | |
parent | de000e339094f8c6e06a635dac9a803861416ec6 (diff) | |
download | FreeBSD-src-db89e312d968c258aba3c79c1c398f5fb19267a3.zip FreeBSD-src-db89e312d968c258aba3c79c1c398f5fb19267a3.tar.gz |
Import LLVM r73340.
Diffstat (limited to 'lib/Archive/ArchiveWriter.cpp')
-rw-r--r-- | lib/Archive/ArchiveWriter.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Archive/ArchiveWriter.cpp b/lib/Archive/ArchiveWriter.cpp index 336a2bd..cebb087 100644 --- a/lib/Archive/ArchiveWriter.cpp +++ b/lib/Archive/ArchiveWriter.cpp @@ -167,10 +167,11 @@ Archive::addFileBefore(const sys::Path& filePath, iterator where, mbr->data = 0; mbr->path = filePath; const sys::FileStatus *FSInfo = mbr->path.getFileStatus(false, ErrMsg); - if (FSInfo) - mbr->info = *FSInfo; - else + if (!FSInfo) { + delete mbr; return true; + } + mbr->info = *FSInfo; unsigned flags = 0; bool hasSlash = filePath.toString().find('/') != std::string::npos; |