]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix non-system-malloc build
authorPo Lu <luangruo@yahoo.com>
Wed, 22 Jun 2022 10:37:32 +0000 (18:37 +0800)
committerPo Lu <luangruo@yahoo.com>
Wed, 22 Jun 2022 10:37:41 +0000 (18:37 +0800)
* src/xterm.c (x_gc_free_ext_data_private): New function.
(x_gc_get_ext_data): Set it as the private data free function.

src/xterm.c

index 9e481c39af0a4424e479168cc80fbe7e33887365..cfe329ab0f7f91381bbe78cd407b095d1ee1c1f0 100644 (file)
@@ -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);
        }
     }