From dc61a42a3caad853b07419c6a4455d6c6aed6257 Mon Sep 17 00:00:00 2001 From: marcus Date: Fri, 12 Apr 2002 17:13:36 +0000 Subject: Fix a resource leak in the GTK pixmap themes. Bump PORTREVISION. PR: 36044 37022 Submitted by: Sascha Holzleiter Reviewed by: sobomax Approved by: sobomax Obtained from: gtk-engines CVS --- x11-themes/gtk-engines/Makefile | 2 +- .../files/patch-pixmap::pixmap_theme_draw.c | 74 ++++++++++++++++++++++ x11-themes/gtk-engines2/Makefile | 2 +- .../files/patch-pixmap::pixmap_theme_draw.c | 74 ++++++++++++++++++++++ x11-toolkits/gtk-engines/Makefile | 2 +- .../files/patch-pixmap::pixmap_theme_draw.c | 74 ++++++++++++++++++++++ x11-toolkits/gtk-engines2/Makefile | 2 +- .../files/patch-pixmap::pixmap_theme_draw.c | 74 ++++++++++++++++++++++ 8 files changed, 300 insertions(+), 4 deletions(-) create mode 100644 x11-themes/gtk-engines/files/patch-pixmap::pixmap_theme_draw.c create mode 100644 x11-themes/gtk-engines2/files/patch-pixmap::pixmap_theme_draw.c create mode 100644 x11-toolkits/gtk-engines/files/patch-pixmap::pixmap_theme_draw.c create mode 100644 x11-toolkits/gtk-engines2/files/patch-pixmap::pixmap_theme_draw.c diff --git a/x11-themes/gtk-engines/Makefile b/x11-themes/gtk-engines/Makefile index 1d778fa..3dcc751 100644 --- a/x11-themes/gtk-engines/Makefile +++ b/x11-themes/gtk-engines/Makefile @@ -7,7 +7,7 @@ PORTNAME= gtk-engines PORTVERSION= 0.12 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= x11-toolkits MASTER_SITES= ${MASTER_SITE_GNOME} MASTER_SITE_SUBDIR= stable/sources/gtk-engines diff --git a/x11-themes/gtk-engines/files/patch-pixmap::pixmap_theme_draw.c b/x11-themes/gtk-engines/files/patch-pixmap::pixmap_theme_draw.c new file mode 100644 index 0000000..b3e5228 --- /dev/null +++ b/x11-themes/gtk-engines/files/patch-pixmap::pixmap_theme_draw.c @@ -0,0 +1,74 @@ +--- pixmap/pixmap_theme_draw.c.orig Mon Feb 7 03:33:43 2000 ++++ pixmap/pixmap_theme_draw.c Fri Apr 12 15:24:40 2002 +@@ -403,8 +403,9 @@ + gdk_gc_set_clip_origin(gc, 0, 0); + } + } +- gdk_imlib_free_pixmap(p); + } ++ if (p) ++ gdk_imlib_free_pixmap(p); + gdk_imlib_destroy_image(im); + } + } +@@ -467,8 +468,9 @@ + gdk_gc_set_clip_mask(gc, NULL); + gdk_gc_set_clip_origin(gc, 0, 0); + } +- gdk_imlib_free_pixmap(p); + } ++ if (p) ++ gdk_imlib_free_pixmap(p); + gdk_imlib_destroy_image(im); + } + +@@ -591,8 +593,9 @@ + gdk_gc_set_clip_mask(gc, NULL); + gdk_gc_set_clip_origin(gc, 0, 0); + } +- gdk_imlib_free_pixmap(p); + } ++ if (p) ++ gdk_imlib_free_pixmap(p); + gdk_imlib_destroy_image(im); + } + } +@@ -956,11 +959,13 @@ + gdk_gc_set_clip_mask(gc, NULL); + gdk_gc_set_clip_origin(gc, 0, 0); + } +- +- gdk_imlib_free_pixmap(p); +- gdk_imlib_free_pixmap(p1); +- gdk_imlib_free_pixmap(p2); + } ++ if (p) ++ gdk_imlib_free_pixmap(p); ++ if (p1) ++ gdk_imlib_free_pixmap(p1); ++ if (p2) ++ gdk_imlib_free_pixmap(p2); + gdk_imlib_destroy_image(im); + gdk_imlib_destroy_image(im1); + gdk_imlib_destroy_image(im2); +@@ -1202,11 +1207,15 @@ + gdk_gc_set_clip_mask(gc, NULL); + gdk_gc_set_clip_origin(gc, 0, 0); + } +- gdk_imlib_free_pixmap(p); +- gdk_imlib_free_pixmap(p1); +- gdk_imlib_free_pixmap(p2); +- gdk_imlib_free_pixmap(p3); + } ++ if (p) ++ gdk_imlib_free_pixmap(p); ++ if (p1) ++ gdk_imlib_free_pixmap(p1); ++ if (p2) ++ gdk_imlib_free_pixmap(p2); ++ if (p3) ++ gdk_imlib_free_pixmap(p3); + gdk_imlib_destroy_image(im); + gdk_imlib_destroy_image(im1); + gdk_imlib_destroy_image(im2); + diff --git a/x11-themes/gtk-engines2/Makefile b/x11-themes/gtk-engines2/Makefile index 1d778fa..3dcc751 100644 --- a/x11-themes/gtk-engines2/Makefile +++ b/x11-themes/gtk-engines2/Makefile @@ -7,7 +7,7 @@ PORTNAME= gtk-engines PORTVERSION= 0.12 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= x11-toolkits MASTER_SITES= ${MASTER_SITE_GNOME} MASTER_SITE_SUBDIR= stable/sources/gtk-engines diff --git a/x11-themes/gtk-engines2/files/patch-pixmap::pixmap_theme_draw.c b/x11-themes/gtk-engines2/files/patch-pixmap::pixmap_theme_draw.c new file mode 100644 index 0000000..b3e5228 --- /dev/null +++ b/x11-themes/gtk-engines2/files/patch-pixmap::pixmap_theme_draw.c @@ -0,0 +1,74 @@ +--- pixmap/pixmap_theme_draw.c.orig Mon Feb 7 03:33:43 2000 ++++ pixmap/pixmap_theme_draw.c Fri Apr 12 15:24:40 2002 +@@ -403,8 +403,9 @@ + gdk_gc_set_clip_origin(gc, 0, 0); + } + } +- gdk_imlib_free_pixmap(p); + } ++ if (p) ++ gdk_imlib_free_pixmap(p); + gdk_imlib_destroy_image(im); + } + } +@@ -467,8 +468,9 @@ + gdk_gc_set_clip_mask(gc, NULL); + gdk_gc_set_clip_origin(gc, 0, 0); + } +- gdk_imlib_free_pixmap(p); + } ++ if (p) ++ gdk_imlib_free_pixmap(p); + gdk_imlib_destroy_image(im); + } + +@@ -591,8 +593,9 @@ + gdk_gc_set_clip_mask(gc, NULL); + gdk_gc_set_clip_origin(gc, 0, 0); + } +- gdk_imlib_free_pixmap(p); + } ++ if (p) ++ gdk_imlib_free_pixmap(p); + gdk_imlib_destroy_image(im); + } + } +@@ -956,11 +959,13 @@ + gdk_gc_set_clip_mask(gc, NULL); + gdk_gc_set_clip_origin(gc, 0, 0); + } +- +- gdk_imlib_free_pixmap(p); +- gdk_imlib_free_pixmap(p1); +- gdk_imlib_free_pixmap(p2); + } ++ if (p) ++ gdk_imlib_free_pixmap(p); ++ if (p1) ++ gdk_imlib_free_pixmap(p1); ++ if (p2) ++ gdk_imlib_free_pixmap(p2); + gdk_imlib_destroy_image(im); + gdk_imlib_destroy_image(im1); + gdk_imlib_destroy_image(im2); +@@ -1202,11 +1207,15 @@ + gdk_gc_set_clip_mask(gc, NULL); + gdk_gc_set_clip_origin(gc, 0, 0); + } +- gdk_imlib_free_pixmap(p); +- gdk_imlib_free_pixmap(p1); +- gdk_imlib_free_pixmap(p2); +- gdk_imlib_free_pixmap(p3); + } ++ if (p) ++ gdk_imlib_free_pixmap(p); ++ if (p1) ++ gdk_imlib_free_pixmap(p1); ++ if (p2) ++ gdk_imlib_free_pixmap(p2); ++ if (p3) ++ gdk_imlib_free_pixmap(p3); + gdk_imlib_destroy_image(im); + gdk_imlib_destroy_image(im1); + gdk_imlib_destroy_image(im2); + diff --git a/x11-toolkits/gtk-engines/Makefile b/x11-toolkits/gtk-engines/Makefile index 1d778fa..3dcc751 100644 --- a/x11-toolkits/gtk-engines/Makefile +++ b/x11-toolkits/gtk-engines/Makefile @@ -7,7 +7,7 @@ PORTNAME= gtk-engines PORTVERSION= 0.12 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= x11-toolkits MASTER_SITES= ${MASTER_SITE_GNOME} MASTER_SITE_SUBDIR= stable/sources/gtk-engines diff --git a/x11-toolkits/gtk-engines/files/patch-pixmap::pixmap_theme_draw.c b/x11-toolkits/gtk-engines/files/patch-pixmap::pixmap_theme_draw.c new file mode 100644 index 0000000..b3e5228 --- /dev/null +++ b/x11-toolkits/gtk-engines/files/patch-pixmap::pixmap_theme_draw.c @@ -0,0 +1,74 @@ +--- pixmap/pixmap_theme_draw.c.orig Mon Feb 7 03:33:43 2000 ++++ pixmap/pixmap_theme_draw.c Fri Apr 12 15:24:40 2002 +@@ -403,8 +403,9 @@ + gdk_gc_set_clip_origin(gc, 0, 0); + } + } +- gdk_imlib_free_pixmap(p); + } ++ if (p) ++ gdk_imlib_free_pixmap(p); + gdk_imlib_destroy_image(im); + } + } +@@ -467,8 +468,9 @@ + gdk_gc_set_clip_mask(gc, NULL); + gdk_gc_set_clip_origin(gc, 0, 0); + } +- gdk_imlib_free_pixmap(p); + } ++ if (p) ++ gdk_imlib_free_pixmap(p); + gdk_imlib_destroy_image(im); + } + +@@ -591,8 +593,9 @@ + gdk_gc_set_clip_mask(gc, NULL); + gdk_gc_set_clip_origin(gc, 0, 0); + } +- gdk_imlib_free_pixmap(p); + } ++ if (p) ++ gdk_imlib_free_pixmap(p); + gdk_imlib_destroy_image(im); + } + } +@@ -956,11 +959,13 @@ + gdk_gc_set_clip_mask(gc, NULL); + gdk_gc_set_clip_origin(gc, 0, 0); + } +- +- gdk_imlib_free_pixmap(p); +- gdk_imlib_free_pixmap(p1); +- gdk_imlib_free_pixmap(p2); + } ++ if (p) ++ gdk_imlib_free_pixmap(p); ++ if (p1) ++ gdk_imlib_free_pixmap(p1); ++ if (p2) ++ gdk_imlib_free_pixmap(p2); + gdk_imlib_destroy_image(im); + gdk_imlib_destroy_image(im1); + gdk_imlib_destroy_image(im2); +@@ -1202,11 +1207,15 @@ + gdk_gc_set_clip_mask(gc, NULL); + gdk_gc_set_clip_origin(gc, 0, 0); + } +- gdk_imlib_free_pixmap(p); +- gdk_imlib_free_pixmap(p1); +- gdk_imlib_free_pixmap(p2); +- gdk_imlib_free_pixmap(p3); + } ++ if (p) ++ gdk_imlib_free_pixmap(p); ++ if (p1) ++ gdk_imlib_free_pixmap(p1); ++ if (p2) ++ gdk_imlib_free_pixmap(p2); ++ if (p3) ++ gdk_imlib_free_pixmap(p3); + gdk_imlib_destroy_image(im); + gdk_imlib_destroy_image(im1); + gdk_imlib_destroy_image(im2); + diff --git a/x11-toolkits/gtk-engines2/Makefile b/x11-toolkits/gtk-engines2/Makefile index 1d778fa..3dcc751 100644 --- a/x11-toolkits/gtk-engines2/Makefile +++ b/x11-toolkits/gtk-engines2/Makefile @@ -7,7 +7,7 @@ PORTNAME= gtk-engines PORTVERSION= 0.12 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= x11-toolkits MASTER_SITES= ${MASTER_SITE_GNOME} MASTER_SITE_SUBDIR= stable/sources/gtk-engines diff --git a/x11-toolkits/gtk-engines2/files/patch-pixmap::pixmap_theme_draw.c b/x11-toolkits/gtk-engines2/files/patch-pixmap::pixmap_theme_draw.c new file mode 100644 index 0000000..b3e5228 --- /dev/null +++ b/x11-toolkits/gtk-engines2/files/patch-pixmap::pixmap_theme_draw.c @@ -0,0 +1,74 @@ +--- pixmap/pixmap_theme_draw.c.orig Mon Feb 7 03:33:43 2000 ++++ pixmap/pixmap_theme_draw.c Fri Apr 12 15:24:40 2002 +@@ -403,8 +403,9 @@ + gdk_gc_set_clip_origin(gc, 0, 0); + } + } +- gdk_imlib_free_pixmap(p); + } ++ if (p) ++ gdk_imlib_free_pixmap(p); + gdk_imlib_destroy_image(im); + } + } +@@ -467,8 +468,9 @@ + gdk_gc_set_clip_mask(gc, NULL); + gdk_gc_set_clip_origin(gc, 0, 0); + } +- gdk_imlib_free_pixmap(p); + } ++ if (p) ++ gdk_imlib_free_pixmap(p); + gdk_imlib_destroy_image(im); + } + +@@ -591,8 +593,9 @@ + gdk_gc_set_clip_mask(gc, NULL); + gdk_gc_set_clip_origin(gc, 0, 0); + } +- gdk_imlib_free_pixmap(p); + } ++ if (p) ++ gdk_imlib_free_pixmap(p); + gdk_imlib_destroy_image(im); + } + } +@@ -956,11 +959,13 @@ + gdk_gc_set_clip_mask(gc, NULL); + gdk_gc_set_clip_origin(gc, 0, 0); + } +- +- gdk_imlib_free_pixmap(p); +- gdk_imlib_free_pixmap(p1); +- gdk_imlib_free_pixmap(p2); + } ++ if (p) ++ gdk_imlib_free_pixmap(p); ++ if (p1) ++ gdk_imlib_free_pixmap(p1); ++ if (p2) ++ gdk_imlib_free_pixmap(p2); + gdk_imlib_destroy_image(im); + gdk_imlib_destroy_image(im1); + gdk_imlib_destroy_image(im2); +@@ -1202,11 +1207,15 @@ + gdk_gc_set_clip_mask(gc, NULL); + gdk_gc_set_clip_origin(gc, 0, 0); + } +- gdk_imlib_free_pixmap(p); +- gdk_imlib_free_pixmap(p1); +- gdk_imlib_free_pixmap(p2); +- gdk_imlib_free_pixmap(p3); + } ++ if (p) ++ gdk_imlib_free_pixmap(p); ++ if (p1) ++ gdk_imlib_free_pixmap(p1); ++ if (p2) ++ gdk_imlib_free_pixmap(p2); ++ if (p3) ++ gdk_imlib_free_pixmap(p3); + gdk_imlib_destroy_image(im); + gdk_imlib_destroy_image(im1); + gdk_imlib_destroy_image(im2); + -- cgit v1.1