In ACRN virtualdisplay setoutput buffer, if the buffer is same as output_handle_
and output_handle_ is not null, delete the buffer to prevent memory leak.
Change-Id: I558f31aea3315481f3a00c1fef1202bb7eb124f1
Tracked-On: None
Tests: Compile sucess for ACRN and baremetal. System without issue.
Signed-off-by: HeYue <yue.he@intel.com>
if (output_handle_) {
handler->CopyHandle(output_handle_, &handle_);
}
+ } else {
+ delete buffer;
}
if (acquire_fence_ > 0) {
if (output_handle_) {
handler->CopyHandle(output_handle_, &handle_);
}
+ } else {
+ delete buffer;
}
if (acquire_fence_ > 0) {