diff options
author | Oscar Deits <odeits@vidder.com> | 2017-08-27 23:19:29 -0400 |
---|---|---|
committer | Oscar Deits <odeits@vidder.com> | 2017-08-27 23:19:29 -0400 |
commit | b5929722363993bf0ad2a56d66176606cc742bc4 (patch) | |
tree | b6dce38dd98d681e97d08d0b42adff078ccf7215 /lib/Support/FileHandling.cpp | |
parent | d19500eb93083c8cc6bb72bcb54414015830cacb (diff) | |
download | klee-b5929722363993bf0ad2a56d66176606cc742bc4.tar.gz |
Remove unnecessary null pointer checks
Fixes klee/klee#717 delete on null pointer is always safe.
Diffstat (limited to 'lib/Support/FileHandling.cpp')
-rw-r--r-- | lib/Support/FileHandling.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Support/FileHandling.cpp b/lib/Support/FileHandling.cpp index e5ead9f7..3e156f3c 100644 --- a/lib/Support/FileHandling.cpp +++ b/lib/Support/FileHandling.cpp @@ -31,8 +31,7 @@ llvm::raw_fd_ostream *klee_open_output_file(std::string &path, f = new llvm::raw_fd_ostream(path.c_str(), error, llvm::sys::fs::F_Binary); #endif if (!error.empty()) { - if (f) - delete f; + delete f; f = NULL; } return f; |