Message ID | 20160803145541.15355-9-marcandre.lureau@redhat.com |
---|---|
State | New |
Headers | show |
diff --git a/util/qdist.c b/util/qdist.c index 56f5738..e94cf46 100644 --- a/util/qdist.c +++ b/util/qdist.c @@ -188,7 +188,8 @@ 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, from->n, + sizeof(struct qdist_entry)); to->n = from->n; memcpy(to->entries, from->entries, sizeof(*to->entries) * to->n); return;