Fix a memory leak in "Copy Binary Content" comment

Ref: https://github.com/notepad-plus-plus/notepad-plus-plus/issues/11671#issuecomment-1128975960
This commit is contained in:
Don Ho 2022-05-17 18:08:40 +02:00
parent 8a37bed448
commit c9b177bb9e
1 changed files with 2 additions and 0 deletions

View File

@ -398,6 +398,8 @@ void Notepad_plus::command(int id)
memcpy(lpucharCopy, pBinText, textLen * sizeof(unsigned char));
lpucharCopy[textLen] = 0; // null character
delete[] pBinText;
GlobalUnlock(hglbCopy);
// Place the handle on the clipboard.