[rcore][desktop] Fix clipboard image memory leak
This commit is contained in:
parent
9ace148917
commit
f740bd35fd
1 changed files with 3 additions and 0 deletions
|
|
@ -1261,6 +1261,9 @@ Image GetClipboardImage(void)
|
|||
if (fileData)
|
||||
{
|
||||
image = LoadImageFromMemory(imageExtensions[i], fileData, (int)dataSize);
|
||||
|
||||
SDL_free(fileData);
|
||||
|
||||
if (IsImageValid(image))
|
||||
{
|
||||
TRACELOG(LOG_INFO, "Clipboard: Got image from clipboard successfully: %s", imageExtensions[i]);
|
||||
|
|
|
|||
Loading…
Reference in a new issue