summaryrefslogtreecommitdiff
path: root/xserver/hw/dmx/input/dmxinputinit.c
diff options
context:
space:
mode:
Diffstat (limited to 'xserver/hw/dmx/input/dmxinputinit.c')
-rw-r--r--xserver/hw/dmx/input/dmxinputinit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xserver/hw/dmx/input/dmxinputinit.c b/xserver/hw/dmx/input/dmxinputinit.c
index 56a39df8c..cdefd9ae0 100644
--- a/xserver/hw/dmx/input/dmxinputinit.c
+++ b/xserver/hw/dmx/input/dmxinputinit.c
@@ -814,8 +814,8 @@ dmxInputCopyLocal(DMXInputInfo * dmxInput, DMXLocalInputInfoPtr s)
dmxLocal->deviceId = -1;
++dmxInput->numDevs;
- dmxInput->devs = realloc(dmxInput->devs,
- dmxInput->numDevs * sizeof(*dmxInput->devs));
+ dmxInput->devs = reallocarray(dmxInput->devs,
+ dmxInput->numDevs, sizeof(*dmxInput->devs));
dmxInput->devs[dmxInput->numDevs - 1] = dmxLocal;
return dmxLocal;