From: Po Lu Date: Wed, 22 Jun 2022 10:37:32 +0000 (+0800) Subject: Fix non-system-malloc build X-Git-Tag: emacs-29.0.90~1447^2~1538 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=18d412a5138f21be77f36e4f8036971d576ef25e;p=emacs.git Fix non-system-malloc build * src/xterm.c (x_gc_free_ext_data_private): New function. (x_gc_get_ext_data): Set it as the private data free function. --- diff --git a/src/xterm.c b/src/xterm.c index 9e481c39af0..cfe329ab0f7 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -4888,6 +4888,14 @@ x_update_opaque_region (struct frame *f, XEvent *configure) #if defined USE_CAIRO || defined HAVE_XRENDER +static int +x_gc_free_ext_data_private (XExtData *extension) +{ + xfree (extension->private_data); + + return 0; +} + static struct x_gc_ext_data * x_gc_get_ext_data (struct frame *f, GC gc, int create_if_not_found_p) { @@ -4907,6 +4915,7 @@ x_gc_get_ext_data (struct frame *f, GC gc, int create_if_not_found_p) ext_data = xzalloc (sizeof (*ext_data)); ext_data->number = dpyinfo->ext_codes->extension; ext_data->private_data = xzalloc (sizeof (struct x_gc_ext_data)); + ext_data->free_private = x_gc_free_ext_data_private; XAddToExtensionList (head, ext_data); } }