From 36c95e38b0f642ecd95b0026a0b6918f6b48b695 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 15 Nov 2004 21:55:06 +0000 Subject: Cleanups. Null out pointer after freeing it for paranoia llvm-svn: 17855 --- llvm/lib/Bytecode/Reader/Reader.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'llvm/lib/Bytecode/Reader') diff --git a/llvm/lib/Bytecode/Reader/Reader.h b/llvm/lib/Bytecode/Reader/Reader.h index c78faf625fe..3733523975d 100644 --- a/llvm/lib/Bytecode/Reader/Reader.h +++ b/llvm/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); -- cgit v1.2.3