diff options
author | ted.mielczarek@gmail.com <ted.mielczarek@gmail.com@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2013-02-14 14:03:51 +0000 |
---|---|---|
committer | ted.mielczarek@gmail.com <ted.mielczarek@gmail.com@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2013-02-14 14:03:51 +0000 |
commit | 0513eeca07c018ca0c70ffbb10c8cecd0a183fe7 (patch) | |
tree | 7353117b793f2a5c886d2c89be620f18da7859d7 | |
parent | Fix some issues with -Werror=sign-compare on Android builds (diff) | |
download | breakpad-0513eeca07c018ca0c70ffbb10c8cecd0a183fe7.tar.xz |
Make MmapWrapper a little less silly
R=thestig at https://breakpad.appspot.com/527002/
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1113 4c0a9323-5329-0410-9bdc-e9ce6186880e
-rw-r--r-- | src/common/linux/dump_symbols.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/common/linux/dump_symbols.cc b/src/common/linux/dump_symbols.cc index b739bf71..ea9b8328 100644 --- a/src/common/linux/dump_symbols.cc +++ b/src/common/linux/dump_symbols.cc @@ -117,7 +117,7 @@ class MmapWrapper { public: MmapWrapper() : is_set_(false) {} ~MmapWrapper() { - if (base_ != NULL) { + if (is_set_ && base_ != NULL) { assert(size_ > 0); munmap(base_, size_); } @@ -129,6 +129,7 @@ class MmapWrapper { } void release() { assert(is_set_); + is_set_ = false; base_ = NULL; size_ = 0; } |