summaryrefslogtreecommitdiff
path: root/hw/kdrive/ephyr/ephyrdriext.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/kdrive/ephyr/ephyrdriext.c')
-rw-r--r--hw/kdrive/ephyr/ephyrdriext.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/kdrive/ephyr/ephyrdriext.c b/hw/kdrive/ephyr/ephyrdriext.c
index 3d5cf7721..748b608c2 100644
--- a/hw/kdrive/ephyr/ephyrdriext.c
+++ b/hw/kdrive/ephyr/ephyrdriext.c
@@ -431,8 +431,8 @@ EphyrDuplicateVisual(unsigned int a_screen,
* extend the list of visual IDs in that entry,
* so to add a_new_id in there.
*/
- vids = realloc(cur_depth->vids,
- (cur_depth->numVids + 1) * sizeof(VisualID));
+ vids = reallocarray(cur_depth->vids,
+ cur_depth->numVids + 1, sizeof(VisualID));
if (!vids) {
EPHYR_LOG_ERROR("failed to realloc numids\n");
goto out;