aboutsummaryrefslogtreecommitdiff
path: root/libX11/src/xkb/XKBAlloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'libX11/src/xkb/XKBAlloc.c')
-rw-r--r--libX11/src/xkb/XKBAlloc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libX11/src/xkb/XKBAlloc.c b/libX11/src/xkb/XKBAlloc.c
index 5cfef0fb8..50a5764d6 100644
--- a/libX11/src/xkb/XKBAlloc.c
+++ b/libX11/src/xkb/XKBAlloc.c
@@ -442,8 +442,7 @@ XkbAllocDeviceInfo(unsigned deviceSpec, unsigned nButtons, unsigned szLeds)
devi->sz_leds = szLeds;
devi->leds = _XkbTypedCalloc(szLeds, XkbDeviceLedInfoRec);
if (!devi->leds) {
- if (devi->btn_acts)
- _XkbFree(devi->btn_acts);
+ _XkbFree(devi->btn_acts);
_XkbFree(devi);
return NULL;
}