From 058b80f906c4e23f84cd5356ec26cea4ef5125ee Mon Sep 17 00:00:00 2001 From: Rahul Frias Date: Wed, 31 Oct 2018 10:22:14 -0700 Subject: [PATCH] Partner (Amazon) reported a memory leak [ Merge of http://go/wvgerrit/64682 ] Looks like we do not delete control_block_ Bug: 117126556 Test: WV unit/integration tests Change-Id: If0b4db163276bbf016bb81ed7e8ef56fa66ea30e --- libwvdrmengine/cdm/core/include/shared_ptr.h | 1 + 1 file changed, 1 insertion(+) diff --git a/libwvdrmengine/cdm/core/include/shared_ptr.h b/libwvdrmengine/cdm/core/include/shared_ptr.h index 07c2f31c..c1596150 100644 --- a/libwvdrmengine/cdm/core/include/shared_ptr.h +++ b/libwvdrmengine/cdm/core/include/shared_ptr.h @@ -116,6 +116,7 @@ class shared_ptr { if (ptr_ != NULL) { if (!RefCountDec(&control_block_->refcount_)) { delete ptr_; + delete control_block_; } } }