commit | e34b0da0384651ba1ba0fde3af47591470ecd431 | [log] [tgz] |
---|---|---|
author | Ashish Kumar Gupta <kumarashishg@google.com> | Wed May 08 12:28:19 2024 +0000 |
committer | Ashish Kumar Gupta <kumarashishg@google.com> | Thu May 09 03:49:14 2024 +0000 |
tree | 4d49b931e05ade928f91f97c75117a75691458ef | |
parent | 2cd702f2808b022c8f20af72b42f25cb2299ec8c [diff] [blame] |
Resource leak issue Bug: 335984333 Change-Id: Id2f8de5e8c185884bd9abf870be93ad5df55c579 Test: presubmit
diff --git a/media/mtp/MtpServer.cpp b/media/mtp/MtpServer.cpp index d917772..80fe51a 100644 --- a/media/mtp/MtpServer.cpp +++ b/media/mtp/MtpServer.cpp
@@ -132,6 +132,10 @@ } MtpServer::~MtpServer() { + if (mHandle) { + delete mHandle; + mHandle = NULL; + } } void MtpServer::addStorage(MtpStorage* storage) {