GfxRadialShading::parse: Fix memory leak on broken files
diff --git a/poppler/GfxState.cc b/poppler/GfxState.cc
index 33d2aaf..b239e27 100644
--- a/poppler/GfxState.cc
+++ b/poppler/GfxState.cc
@@ -4277,6 +4277,9 @@
     for (i = 0; i < nFuncsA; ++i) {
       Object obj2 = obj1.arrayGet(i);
       if (!(funcsA[i] = Function::parse(&obj2))) {
+	for (int j = 0; j < i; ++j) {
+	  delete funcsA[j];
+	}
 	return nullptr;
       }
     }