diff options
author | David Wagner <david.wagner@intel.com> | 2014-09-24 09:42:11 +0200 |
---|---|---|
committer | Mattijs Korpershoek <mattijsx.korpershoek@intel.com> | 2014-10-02 11:16:43 +0200 |
commit | ccb745447386f49e018fe39d1ec54a652eefa57f (patch) | |
tree | 37cc4fef9c9b2013f45ce12fbd8d563fb6578934 /parameter/BinaryStream.cpp | |
parent | f811b7b53c0c2f0d4320c70230e609619c5087c1 (diff) | |
download | external_parameter-framework-ccb745447386f49e018fe39d1ec54a652eefa57f.zip external_parameter-framework-ccb745447386f49e018fe39d1ec54a652eefa57f.tar.gz external_parameter-framework-ccb745447386f49e018fe39d1ec54a652eefa57f.tar.bz2 |
Fix a use-after-free issue
In CBinaryStream, a member gets used after it has been destroyed. This was
caught by a static code analyser.
Issue: GMINL-1702
Change-Id: I5c93855f12a8f392e1f4249a15048816fb0f13ce
Signed-off-by: David Wagner <david.wagner@intel.com>
Reviewed-on: https://android.intel.com/278483
Reviewed-by: cactus <cactus@intel.com>
Tested-by: cactus <cactus@intel.com>
Reviewed-by: Beatty, Robert M <robert.m.beatty@intel.com>
Tested-by: Beatty, Robert M <robert.m.beatty@intel.com>
Diffstat (limited to 'parameter/BinaryStream.cpp')
-rw-r--r-- | parameter/BinaryStream.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/parameter/BinaryStream.cpp b/parameter/BinaryStream.cpp index 42b6185..701e9b8 100644 --- a/parameter/BinaryStream.cpp +++ b/parameter/BinaryStream.cpp @@ -46,12 +46,12 @@ CBinaryStream::CBinaryStream(const string& strFileName, bool bOut, uint32_t uiDa CBinaryStream::~CBinaryStream() { - delete [] _puiData; - if (_bOpen) { close(); } + + delete [] _puiData; } bool CBinaryStream::open(string& strError) |