summaryrefslogtreecommitdiff
path: root/util/qdist.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/qdist.c')
-rw-r--r--util/qdist.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/qdist.c b/util/qdist.c
index 56f573837d..eb2236cdc8 100644
--- a/util/qdist.c
+++ b/util/qdist.c
@@ -188,7 +188,7 @@ void qdist_bin__internal(struct qdist *to, const struct qdist *from, size_t n)
}
}
/* they're equally spaced, so copy the dist and bail out */
- to->entries = g_new(struct qdist_entry, from->n);
+ to->entries = g_realloc_n(to->entries, n, sizeof(*to->entries));
to->n = from->n;
memcpy(to->entries, from->entries, sizeof(*to->entries) * to->n);
return;