diff --git a/libImaging/Draw.c b/libImaging/Draw.c index 8daf0e2c0..ad8d589af 100644 --- a/libImaging/Draw.c +++ b/libImaging/Draw.c @@ -459,6 +459,7 @@ polygon_generic(Imaging im, int n, Edge *e, int ink, int eofill, /* Process the edge table with a scan line searching for intersections */ float* xx = malloc(sizeof(float) * edge_count * 2); if (!xx) { + free(edge_table) return -1; } for (; ymin <= ymax; ymin++) {