Skip to content

Commit

Permalink
backend: dummy: fix images' pixmaps leak
Browse files Browse the repository at this point in the history
  • Loading branch information
absolutelynothelix committed Feb 12, 2023
1 parent cee1287 commit 4e243c3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/backend/dummy/dummy.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ void dummy_deinit(struct backend_base *data) {
HASH_ITER2(dummy->images, img) {
log_warn("Backend image for pixmap %#010x is not freed", img->pixmap);
HASH_DEL(dummy->images, img);
xcb_free_pixmap(dummy->base.c, img->pixmap);
free(img->refcount);
free(img);
}
Expand Down Expand Up @@ -111,6 +112,7 @@ void dummy_release_image(backend_t *base, void *image) {
(*img->refcount)--;
if (*img->refcount == 0) {
HASH_DEL(dummy->images, img);
xcb_free_pixmap(dummy->base.c, img->pixmap);
free(img->refcount);
free(img);
}
Expand Down

0 comments on commit 4e243c3

Please sign in to comment.