summaryrefslogtreecommitdiff
path: root/src/cairo-pattern.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cairo-pattern.c')
-rw-r--r--src/cairo-pattern.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cairo-pattern.c b/src/cairo-pattern.c
index 231f5b25..1830634e 100644
--- a/src/cairo-pattern.c
+++ b/src/cairo-pattern.c
@@ -765,7 +765,9 @@ _cairo_pattern_gradient_grow (cairo_gradient_pattern_t *pattern)
if (new_stops)
memcpy (new_stops, pattern->stops, old_size * sizeof (cairo_gradient_stop_t));
} else {
- new_stops = realloc (pattern->stops, new_size * sizeof (cairo_gradient_stop_t));
+ new_stops = _cairo_realloc_ab (pattern->stops,
+ new_size,
+ sizeof (cairo_gradient_stop_t));
}
if (new_stops == NULL) {