#include <stdint.h>
#include <string.h>
#include <fcntl.h>
+#include <cgraph/alloc.h>
#include <cgraph/unreachable.h>
#include <gvc/gvplugin_render.h>
#include <gvc/gvplugin_device.h>
p = DEFAULT_FONTPATH;
#endif
free(lastmissing);
- lastmissing = strdup(fontreq);
+ lastmissing = gv_strdup(fontreq);
n_errors++;
}
}
if (pen_ok || fill_ok) {
if (n > 0 && (size_t)n > points_allocated) {
- points = realloc(points, (size_t)n * sizeof(gdPoint));
+ points = gv_recalloc(points, points_allocated, (size_t)n, sizeof(gdPoint));
points_allocated = (size_t)n;
}
for (i = 0; i < n; i++) {