diff --git a/gdk/x11/gdkdevice-xi2.c b/gdk/x11/gdkdevice-xi2.c index 0102f65c7a..d59dc37612 100644 --- a/gdk/x11/gdkdevice-xi2.c +++ b/gdk/x11/gdkdevice-xi2.c @@ -26,6 +26,8 @@ #include "gdkprivate-x11.h" #include "gdkdisplay-x11.h" +#include "gdk-private.h" + #include #include #include @@ -760,7 +762,7 @@ gdk_x11_device_xi2_store_axes (GdkX11DeviceXI2 *device, g_free (device->last_axes); if (axes && n_axes) - device->last_axes = g_memdup (axes, sizeof (double) * n_axes); + device->last_axes = g_memdup2 (axes, sizeof (double) * n_axes); else device->last_axes = NULL; } diff --git a/gdk/x11/gdksurface-x11.c b/gdk/x11/gdksurface-x11.c index feecf917a2..1ab71a7cce 100644 --- a/gdk/x11/gdksurface-x11.c +++ b/gdk/x11/gdksurface-x11.c @@ -4232,7 +4232,7 @@ _gdk_x11_moveresize_handle_event (const XEvent *event) *mv_resize->moveresize_pending_event = *event; else mv_resize->moveresize_pending_event = - g_memdup (event, sizeof (XEvent)); + g_memdup2 (event, sizeof (XEvent)); break; }