Fix memory leak in DisassemblerX86.
A memory leak in DisassemblerX86 is detected by valgrind. This patch fixes the DisassemblerX86 destructor to properly free the |current_instr_| variable. BUG=471 TEST=Run valgrind on disassembler_x86_unittest to verify the leak is gone. Review URL: https://breakpad.appspot.com/371001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@940 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
parent
f6147a6460
commit
1d8752bf0f
1 changed files with 3 additions and 0 deletions
|
@ -48,6 +48,9 @@ DisassemblerX86::DisassemblerX86(const u_int8_t *bytecode,
|
||||||
}
|
}
|
||||||
|
|
||||||
DisassemblerX86::~DisassemblerX86() {
|
DisassemblerX86::~DisassemblerX86() {
|
||||||
|
if (instr_valid_)
|
||||||
|
libdis::x86_oplist_free(¤t_instr_);
|
||||||
|
|
||||||
libdis::x86_cleanup();
|
libdis::x86_cleanup();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue