From: Eli Zaretskii Date: Tue, 13 Sep 2022 13:38:50 +0000 (+0300) Subject: ; * src/image.c (svg_load_image): Always free 'err' if non-NULL. X-Git-Tag: emacs-29.0.90~1856^2~562 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=96b221dd2a6f36143e2e132c5ee9d13d5f39d4b3;p=emacs.git ; * src/image.c (svg_load_image): Always free 'err' if non-NULL. --- diff --git a/src/image.c b/src/image.c index b1d597d7213..52fdf861384 100644 --- a/src/image.c +++ b/src/image.c @@ -11552,9 +11552,11 @@ svg_load_image (struct frame *f, struct image *img, char *contents, while (c_isspace (errmsg[errlen - 1])) errlen--; image_error ("Error parsing SVG image: %s", make_string (errmsg, errlen)); - g_error_free (err); } + if (err) + g_error_free (err); + done_error: if (rsvg_handle) g_object_unref (rsvg_handle);