summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog19
-rw-r--r--ChangeLog.pre-2-019
-rw-r--r--ChangeLog.pre-2-1019
-rw-r--r--ChangeLog.pre-2-219
-rw-r--r--ChangeLog.pre-2-419
-rw-r--r--ChangeLog.pre-2-619
-rw-r--r--ChangeLog.pre-2-819
-rw-r--r--gdk-pixbuf/gdk-pixbuf.c6
-rw-r--r--gdk-pixbuf/io-jpeg.c4
-rw-r--r--gdk-pixbuf/io-png.c8
-rw-r--r--gdk-pixbuf/pixops/timescale.c8
-rw-r--r--gdk-pixbuf/test-gdk-pixbuf.c3
-rw-r--r--gdk/linux-fb/gdkimage-fb.c5
-rw-r--r--gtk/gtkcalendar.c2
14 files changed, 148 insertions, 21 deletions
diff --git a/ChangeLog b/ChangeLog
index 3429a42d1b..d4d0e89ed1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,21 @@
-2001-02-19 <alla@lysator.liu.se>
+2001-02-19 Alexander Larsson <alexl@redhat.com>
+
+ * gdk/linux-fb/gdkimage-fb.c (gdk_image_new_bitmap):
+ Copy data and free data with free().
+
+ * gdk-pixbuf/gdk-pixbuf.c:
+ * gdk-pixbuf/io-jpeg.c:
+ * gdk-pixbuf/io-png.c:
+ Use g_try_malloc/g_free instead malloc/free.
+
+ * gdk-pixbuf/test-gdk-pixbuf.c:
+ Must... initialize... gobject...
+
+ * gdk-pixbuf/pixops/timescale.c:
+ * gtk/gtkcalendar.c:
+ Use g_malloc instead of malloc.
+
+2001-02-19 Alexander Larsson <alla@lysator.liu.se>
* gtk/testgtkrc:
Comment out property assignments, these don't work yet.
diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0
index 3429a42d1b..d4d0e89ed1 100644
--- a/ChangeLog.pre-2-0
+++ b/ChangeLog.pre-2-0
@@ -1,4 +1,21 @@
-2001-02-19 <alla@lysator.liu.se>
+2001-02-19 Alexander Larsson <alexl@redhat.com>
+
+ * gdk/linux-fb/gdkimage-fb.c (gdk_image_new_bitmap):
+ Copy data and free data with free().
+
+ * gdk-pixbuf/gdk-pixbuf.c:
+ * gdk-pixbuf/io-jpeg.c:
+ * gdk-pixbuf/io-png.c:
+ Use g_try_malloc/g_free instead malloc/free.
+
+ * gdk-pixbuf/test-gdk-pixbuf.c:
+ Must... initialize... gobject...
+
+ * gdk-pixbuf/pixops/timescale.c:
+ * gtk/gtkcalendar.c:
+ Use g_malloc instead of malloc.
+
+2001-02-19 Alexander Larsson <alla@lysator.liu.se>
* gtk/testgtkrc:
Comment out property assignments, these don't work yet.
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index 3429a42d1b..d4d0e89ed1 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,4 +1,21 @@
-2001-02-19 <alla@lysator.liu.se>
+2001-02-19 Alexander Larsson <alexl@redhat.com>
+
+ * gdk/linux-fb/gdkimage-fb.c (gdk_image_new_bitmap):
+ Copy data and free data with free().
+
+ * gdk-pixbuf/gdk-pixbuf.c:
+ * gdk-pixbuf/io-jpeg.c:
+ * gdk-pixbuf/io-png.c:
+ Use g_try_malloc/g_free instead malloc/free.
+
+ * gdk-pixbuf/test-gdk-pixbuf.c:
+ Must... initialize... gobject...
+
+ * gdk-pixbuf/pixops/timescale.c:
+ * gtk/gtkcalendar.c:
+ Use g_malloc instead of malloc.
+
+2001-02-19 Alexander Larsson <alla@lysator.liu.se>
* gtk/testgtkrc:
Comment out property assignments, these don't work yet.
diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2
index 3429a42d1b..d4d0e89ed1 100644
--- a/ChangeLog.pre-2-2
+++ b/ChangeLog.pre-2-2
@@ -1,4 +1,21 @@
-2001-02-19 <alla@lysator.liu.se>
+2001-02-19 Alexander Larsson <alexl@redhat.com>
+
+ * gdk/linux-fb/gdkimage-fb.c (gdk_image_new_bitmap):
+ Copy data and free data with free().
+
+ * gdk-pixbuf/gdk-pixbuf.c:
+ * gdk-pixbuf/io-jpeg.c:
+ * gdk-pixbuf/io-png.c:
+ Use g_try_malloc/g_free instead malloc/free.
+
+ * gdk-pixbuf/test-gdk-pixbuf.c:
+ Must... initialize... gobject...
+
+ * gdk-pixbuf/pixops/timescale.c:
+ * gtk/gtkcalendar.c:
+ Use g_malloc instead of malloc.
+
+2001-02-19 Alexander Larsson <alla@lysator.liu.se>
* gtk/testgtkrc:
Comment out property assignments, these don't work yet.
diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4
index 3429a42d1b..d4d0e89ed1 100644
--- a/ChangeLog.pre-2-4
+++ b/ChangeLog.pre-2-4
@@ -1,4 +1,21 @@
-2001-02-19 <alla@lysator.liu.se>
+2001-02-19 Alexander Larsson <alexl@redhat.com>
+
+ * gdk/linux-fb/gdkimage-fb.c (gdk_image_new_bitmap):
+ Copy data and free data with free().
+
+ * gdk-pixbuf/gdk-pixbuf.c:
+ * gdk-pixbuf/io-jpeg.c:
+ * gdk-pixbuf/io-png.c:
+ Use g_try_malloc/g_free instead malloc/free.
+
+ * gdk-pixbuf/test-gdk-pixbuf.c:
+ Must... initialize... gobject...
+
+ * gdk-pixbuf/pixops/timescale.c:
+ * gtk/gtkcalendar.c:
+ Use g_malloc instead of malloc.
+
+2001-02-19 Alexander Larsson <alla@lysator.liu.se>
* gtk/testgtkrc:
Comment out property assignments, these don't work yet.
diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6
index 3429a42d1b..d4d0e89ed1 100644
--- a/ChangeLog.pre-2-6
+++ b/ChangeLog.pre-2-6
@@ -1,4 +1,21 @@
-2001-02-19 <alla@lysator.liu.se>
+2001-02-19 Alexander Larsson <alexl@redhat.com>
+
+ * gdk/linux-fb/gdkimage-fb.c (gdk_image_new_bitmap):
+ Copy data and free data with free().
+
+ * gdk-pixbuf/gdk-pixbuf.c:
+ * gdk-pixbuf/io-jpeg.c:
+ * gdk-pixbuf/io-png.c:
+ Use g_try_malloc/g_free instead malloc/free.
+
+ * gdk-pixbuf/test-gdk-pixbuf.c:
+ Must... initialize... gobject...
+
+ * gdk-pixbuf/pixops/timescale.c:
+ * gtk/gtkcalendar.c:
+ Use g_malloc instead of malloc.
+
+2001-02-19 Alexander Larsson <alla@lysator.liu.se>
* gtk/testgtkrc:
Comment out property assignments, these don't work yet.
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index 3429a42d1b..d4d0e89ed1 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,4 +1,21 @@
-2001-02-19 <alla@lysator.liu.se>
+2001-02-19 Alexander Larsson <alexl@redhat.com>
+
+ * gdk/linux-fb/gdkimage-fb.c (gdk_image_new_bitmap):
+ Copy data and free data with free().
+
+ * gdk-pixbuf/gdk-pixbuf.c:
+ * gdk-pixbuf/io-jpeg.c:
+ * gdk-pixbuf/io-png.c:
+ Use g_try_malloc/g_free instead malloc/free.
+
+ * gdk-pixbuf/test-gdk-pixbuf.c:
+ Must... initialize... gobject...
+
+ * gdk-pixbuf/pixops/timescale.c:
+ * gtk/gtkcalendar.c:
+ Use g_malloc instead of malloc.
+
+2001-02-19 Alexander Larsson <alla@lysator.liu.se>
* gtk/testgtkrc:
Comment out property assignments, these don't work yet.
diff --git a/gdk-pixbuf/gdk-pixbuf.c b/gdk-pixbuf/gdk-pixbuf.c
index 724753d2da..2a65082d93 100644
--- a/gdk-pixbuf/gdk-pixbuf.c
+++ b/gdk-pixbuf/gdk-pixbuf.c
@@ -117,7 +117,7 @@ gdk_pixbuf_unref (GdkPixbuf *pixbuf)
static void
free_buffer (guchar *pixels, gpointer data)
{
- free (pixels);
+ g_free (pixels);
}
/**
@@ -153,7 +153,7 @@ gdk_pixbuf_new (GdkColorspace colorspace, gboolean has_alpha, int bits_per_sampl
channels = has_alpha ? 4 : 3;
rowstride = 4 * ((channels * width + 3) / 4);
- buf = malloc (height * rowstride);
+ buf = g_try_malloc (height * rowstride);
if (!buf)
return NULL;
@@ -188,7 +188,7 @@ gdk_pixbuf_copy (const GdkPixbuf *pixbuf)
size = ((pixbuf->height - 1) * pixbuf->rowstride +
pixbuf->width * ((pixbuf->n_channels * pixbuf->bits_per_sample + 7) / 8));
- buf = malloc (size * sizeof (guchar));
+ buf = g_try_malloc (size * sizeof (guchar));
if (!buf)
return NULL;
diff --git a/gdk-pixbuf/io-jpeg.c b/gdk-pixbuf/io-jpeg.c
index de40d2e786..2c295131d9 100644
--- a/gdk-pixbuf/io-jpeg.c
+++ b/gdk-pixbuf/io-jpeg.c
@@ -145,7 +145,7 @@ output_message_handler (j_common_ptr cinfo)
static void
free_buffer (guchar *pixels, gpointer data)
{
- free (pixels);
+ g_free (pixels);
}
@@ -222,7 +222,7 @@ gdk_pixbuf__jpeg_image_load (FILE *f, GError **error)
w = cinfo.output_width;
h = cinfo.output_height;
- pixels = malloc (h * w * 3);
+ pixels = g_try_malloc (h * w * 3);
if (!pixels) {
jpeg_destroy_decompress (&cinfo);
diff --git a/gdk-pixbuf/io-png.c b/gdk-pixbuf/io-png.c
index 19ca6132be..9ece35d40d 100644
--- a/gdk-pixbuf/io-png.c
+++ b/gdk-pixbuf/io-png.c
@@ -176,7 +176,7 @@ png_simple_warning_callback(png_structp png_save_ptr,
static void
free_buffer (guchar *pixels, gpointer data)
{
- free (pixels);
+ g_free (pixels);
}
/* Shared library entry point */
@@ -230,7 +230,7 @@ gdk_pixbuf__png_image_load (FILE *f, GError **error)
else
bpp = 3;
- pixels = malloc (w * h * bpp);
+ pixels = g_try_malloc (w * h * bpp);
if (!pixels) {
/* Check error NULL, normally this would be broken,
* but libpng makes me want to code defensively.
@@ -701,7 +701,7 @@ gdk_pixbuf__png_image_save (FILE *f,
png_set_IHDR (png_ptr, info_ptr, w, h, bpc,
PNG_COLOR_TYPE_RGB, PNG_INTERLACE_NONE,
PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE);
- data = malloc (w * 3 * sizeof (char));
+ data = g_try_malloc (w * 3 * sizeof (char));
if (data == NULL) {
/* Check error NULL, normally this would be broken,
@@ -741,7 +741,7 @@ gdk_pixbuf__png_image_save (FILE *f,
}
if (data)
- free (data);
+ g_free (data);
png_write_end (png_ptr, info_ptr);
png_destroy_write_struct (&png_ptr, (png_infopp) NULL);
diff --git a/gdk-pixbuf/pixops/timescale.c b/gdk-pixbuf/pixops/timescale.c
index f3c9045667..76b2f8d19d 100644
--- a/gdk-pixbuf/pixops/timescale.c
+++ b/gdk-pixbuf/pixops/timescale.c
@@ -146,10 +146,10 @@ int main (int argc, char **argv)
int filter_level;
- src_buf = malloc(src_rowstride * src_height);
+ src_buf = g_malloc(src_rowstride * src_height);
memset (src_buf, 0x80, src_rowstride * src_height);
- dest_buf = malloc(dest_rowstride * dest_height);
+ dest_buf = g_malloc(dest_rowstride * dest_height);
memset (dest_buf, 0x80, dest_rowstride * dest_height);
for (filter_level = GDK_INTERP_NEAREST ; filter_level <= GDK_INTERP_HYPER; filter_level++)
@@ -216,8 +216,8 @@ int main (int argc, char **argv)
}
printf ("\n");
- free (src_buf);
- free (dest_buf);
+ g_free (src_buf);
+ g_free (dest_buf);
}
printf ("SCALE\n=====\n\n");
diff --git a/gdk-pixbuf/test-gdk-pixbuf.c b/gdk-pixbuf/test-gdk-pixbuf.c
index 4f6f51cc5b..c2bfbbbf02 100644
--- a/gdk-pixbuf/test-gdk-pixbuf.c
+++ b/gdk-pixbuf/test-gdk-pixbuf.c
@@ -25,6 +25,7 @@
#include <stdlib.h>
#include "gdk-pixbuf.h"
+#include <gobject/gtype.h>
@@ -228,6 +229,8 @@ main (int argc, char **argv)
int result;
result = EXIT_SUCCESS;
+
+ g_type_init (G_TYPE_DEBUG_NONE);
/* Run some tests. */
if (!simple_composite_test ()) {
diff --git a/gdk/linux-fb/gdkimage-fb.c b/gdk/linux-fb/gdkimage-fb.c
index 26aded2a24..851c8bbd37 100644
--- a/gdk/linux-fb/gdkimage-fb.c
+++ b/gdk/linux-fb/gdkimage-fb.c
@@ -126,7 +126,12 @@ gdk_image_new_bitmap(GdkVisual *visual,
image->bpp = 1;
image->bpl = (w+7)/8;
image->mem = g_malloc (image->bpl * h / 8);
+ memcpy (image->mem, data, image->bpl * h / 8);
+ /* This must be freed using free, not g_free, since in the X version
+ this is freed by xlib. */
+ free (data);
+
return image;
}
diff --git a/gtk/gtkcalendar.c b/gtk/gtkcalendar.c
index d9ae77af12..debb603e37 100644
--- a/gtk/gtkcalendar.c
+++ b/gtk/gtkcalendar.c
@@ -430,7 +430,7 @@ gtk_calendar_init (GtkCalendar *calendar)
widget = GTK_WIDGET (calendar);
GTK_WIDGET_SET_FLAGS (widget, GTK_CAN_FOCUS);
- calendar->private_data = (gpointer) malloc (sizeof (GtkCalendarPrivateData));
+ calendar->private_data = (gpointer) g_malloc (sizeof (GtkCalendarPrivateData));
private_data = GTK_CALENDAR_PRIVATE_DATA (calendar);
if (!default_abbreviated_dayname[0])