summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Shkenev <petershh@disroot.org>2024-08-10 14:06:51 +0100
committerVincent Sanders <vince@kyllikki.org>2024-08-10 14:06:51 +0100
commit2443ff581ccd08b2fb36e1539a6b67da671ec430 (patch)
tree885c399ac4bed5f2fb2bbe5206270e8ee659ac41
parentd5b4c96268df11437957c288f95490f011db9335 (diff)
downloadlibnsfb-2443ff581ccd08b2fb36e1539a6b67da671ec430.tar.gz
libnsfb-2443ff581ccd08b2fb36e1539a6b67da671ec430.tar.bz2
x surface fix use-after-freeHEADmaster
This fixes compilation with gcc 14.
-rw-r--r--src/surface/x.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/surface/x.c b/src/surface/x.c
index c011b38..dfbae56 100644
--- a/src/surface/x.c
+++ b/src/surface/x.c
@@ -808,8 +808,8 @@ static int x_initialise(nsfb_t *nsfb)
if (xstate->image == NULL) {
fprintf(stderr, "Unable to create image\n");
- free(xstate);
xcb_disconnect(xstate->connection);
+ free(xstate);
return -1;
}