Skip to content

Commit 42cd06a

Browse files
committed
tslib.c: Fix memory allocation
Signed-off-by: Martin Kepplinger <martin.kepplinger@ginzinger.com>
1 parent 73f67d5 commit 42cd06a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tslib.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ static int xf86TslibInit(__attribute__ ((unused)) InputDriverPtr drv,
485485
#ifdef TSLIB_VERSION_MT
486486
int i;
487487

488-
priv->samp_mt = malloc(priv->slots * sizeof(struct ts_sample_mt *));
488+
priv->samp_mt = malloc(TOUCH_SAMPLES_READ * sizeof(struct ts_sample_mt *));
489489
if (!priv->samp_mt)
490490
return BadValue;
491491

0 commit comments

Comments
 (0)