[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master aff58e3: * src/image.c (svg_load_image): Use xmalloc and xfree. (
From: |
Alan Third |
Subject: |
master aff58e3: * src/image.c (svg_load_image): Use xmalloc and xfree. (bug#43135) |
Date: |
Thu, 3 Sep 2020 15:56:42 -0400 (EDT) |
branch: master
commit aff58e3f03d44f48ceba48f75414ab687de4eec7
Author: Alan Third <alan@idiocy.org>
Commit: Alan Third <alan@idiocy.org>
* src/image.c (svg_load_image): Use xmalloc and xfree. (bug#43135)
---
src/image.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/image.c b/src/image.c
index 35c5946..d8c3466 100644
--- a/src/image.c
+++ b/src/image.c
@@ -9830,7 +9830,7 @@ svg_load_image (struct frame *f, struct image *img, char
*contents,
img->background_valid = 1;
}
- wrapped_contents = malloc (buffer_size);
+ wrapped_contents = xmalloc (buffer_size);
if (!wrapped_contents
|| buffer_size <= snprintf (wrapped_contents, buffer_size, wrapper,
@@ -9889,7 +9889,7 @@ svg_load_image (struct frame *f, struct image *img, char
*contents,
pixbuf = rsvg_handle_get_pixbuf (rsvg_handle);
if (!pixbuf) goto rsvg_error;
g_object_unref (rsvg_handle);
- free (wrapped_contents);
+ xfree (wrapped_contents);
/* Extract some meta data from the svg handle. */
width = gdk_pixbuf_get_width (pixbuf);
@@ -9960,7 +9960,7 @@ svg_load_image (struct frame *f, struct image *img, char
*contents,
if (rsvg_handle)
g_object_unref (rsvg_handle);
if (wrapped_contents)
- free (wrapped_contents);
+ xfree (wrapped_contents);
/* FIXME: Use error->message so the user knows what is the actual
problem with the image. */
image_error ("Error parsing SVG image `%s'", img->spec);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master aff58e3: * src/image.c (svg_load_image): Use xmalloc and xfree. (bug#43135),
Alan Third <=