From c870519f8c58df3e8265467afbcc10f791918174 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Sun, 31 Jul 2022 09:16:12 -0700 Subject: [PATCH] common genEllipticPath: fix unchecked allocation --- lib/common/ellipse.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/common/ellipse.c b/lib/common/ellipse.c index ac87d9b21..c340831b4 100644 --- a/lib/common/ellipse.c +++ b/lib/common/ellipse.c @@ -57,8 +57,6 @@ #define MAX(a,b) ((a)>(b)?(a):(b)) #define MIN(a,b) ((a)<(b)?(a):(b)) -#define NEW(t) calloc(1,sizeof(t)) - #define PI 3.14159265358979323846 typedef struct { @@ -460,7 +458,7 @@ static Ppolyline_t *genEllipticPath(ellipse_t * ep) { double yBDot; double t; double alpha; - Ppolyline_t *polypath = NEW(Ppolyline_t); + Ppolyline_t *polypath = gv_alloc(sizeof(Ppolyline_t)); static const double THRESHOLD = 0.00001; // quality of approximation static const int DEGREE = 3; -- 2.50.1