Skip to content

fix: prevent GBytes leak in GdkPixbufFromSkBitmap on Linux/GTK#49895

Merged
dsanders11 merged 1 commit into
41-x-yfrom
trop/41-x-y-bp-fix-prevent-gbytes-leak-in-gdkpixbuffromskbitmap-on-linux-gtk-1771617655280
Feb 20, 2026
Merged

fix: prevent GBytes leak in GdkPixbufFromSkBitmap on Linux/GTK#49895
dsanders11 merged 1 commit into
41-x-yfrom
trop/41-x-y-bp-fix-prevent-gbytes-leak-in-gdkpixbuffromskbitmap-on-linux-gtk-1771617655280

Conversation

@trop
Copy link
Copy Markdown
Contributor

@trop trop Bot commented Feb 20, 2026

Backport of #49863

See that PR for details.

Notes: Fix memory leak when setting icons on Linux/GTK

Inside gtk_util::GdkPixbufFromSkBitmap, g_bytes_new() was called
inline as an argument to gdk_pixbuf_new_from_bytes(), which per
GTK docs does not take ownership of the GBytes - it adds its own
internal reference. The caller's GBytes* was never stored or
unreffed, leaking 4 x width x height bytes of pixel data on every
call.

Co-authored-by: redeemer <marcin.probola@gmail.com>
@trop trop Bot requested a review from a team February 20, 2026 20:01
@trop trop Bot added 41-x-y backport This is a backport PR semver/patch backwards-compatible bug fixes labels Feb 20, 2026
@dsanders11 dsanders11 merged commit b5c7b6f into 41-x-y Feb 20, 2026
67 checks passed
@release-clerk
Copy link
Copy Markdown

release-clerk Bot commented Feb 20, 2026

Release Notes Persisted

Fix memory leak when setting icons on Linux/GTK

@dsanders11 dsanders11 deleted the trop/41-x-y-bp-fix-prevent-gbytes-leak-in-gdkpixbuffromskbitmap-on-linux-gtk-1771617655280 branch February 20, 2026 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

41-x-y backport This is a backport PR semver/patch backwards-compatible bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant