shithub: drawterm

Download patch

ref: f12ca802b4d7783898e6e5c1537c44af461f12ed
parent: 5689c790ad6e428ad640051d399f5966c995f978
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Fri Feb 1 12:38:01 EST 2019

gui-x11: free the right GC in xallocmemimage() error case

--- a/gui-x11/x11.c
+++ b/gui-x11/x11.c
@@ -386,7 +386,7 @@
 
 	mi = xallocmemimage(r, chan, pix, &xi);
 	if(mi == nil){
-		XFreeGC(xdisplay, xgccopy);
+		XFreeGC(xdisplay, gc);
 		XFreePixmap(xdisplay, pix);
 		return;
 	}