diff --git a/wrlib/xutil.c b/wrlib/xutil.c index e279cd62..8588e780 100644 --- a/wrlib/xutil.c +++ b/wrlib/xutil.c @@ -168,7 +168,6 @@ RDestroyXImage(RContext *context, RXImage *rximage) { #ifndef XSHM XDestroyImage(rximage->image); - free(rximage); #else /* XSHM */ if (rximage->is_shared) { XSync(context->dpy, False); @@ -182,6 +181,7 @@ RDestroyXImage(RContext *context, RXImage *rximage) XDestroyImage(rximage->image); } #endif + free(rximage); }