diff options
author | Chris Lattner <sabre@nondot.org> | 2004-11-15 21:55:06 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-11-15 21:55:06 +0000 |
commit | 1992522abd2742ca1cbf24ceec8a6020c6fbc248 (patch) | |
tree | 41c1f43c3c1e6550872eb578a8ca9aed7e394ac8 /lib/Bytecode/Reader/Reader.h | |
parent | 86c936576150295078ce1e468d8800e6d62614e0 (diff) |
Cleanups. Null out pointer after freeing it for paranoia
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17855 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bytecode/Reader/Reader.h')
-rw-r--r-- | lib/Bytecode/Reader/Reader.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Bytecode/Reader/Reader.h b/lib/Bytecode/Reader/Reader.h index c78faf625f..3733523975 100644 --- a/lib/Bytecode/Reader/Reader.h +++ b/lib/Bytecode/Reader/Reader.h @@ -44,17 +44,17 @@ class BytecodeReader : public ModuleProvider { /// @{ public: /// @brief Default constructor. By default, no handler is used. - BytecodeReader( - BytecodeHandler* h = 0 - ) { + BytecodeReader(BytecodeHandler* h = 0) { decompressedBlock = 0; Handler = h; } ~BytecodeReader() { freeState(); - if (decompressedBlock) + if (decompressedBlock) { ::free(decompressedBlock); + decompressedBlock = 0; + } } /// @} @@ -411,7 +411,7 @@ private: inline const Type* getSanitizedType(unsigned& ID ); /// @brief Read in and get a sanitized type id - inline const Type* BytecodeReader::readSanitizedType(); + inline const Type* readSanitizedType(); /// @brief Converts a Type* to its type slot number unsigned getTypeSlot(const Type *Ty); |