Commit d706a9ae authored by Albert Astals Cid's avatar Albert Astals Cid

GfxRadialShading::parse: Fix memory leak on broken files

parent f3502635
......@@ -4277,6 +4277,9 @@ GfxRadialShading *GfxRadialShading::parse(GfxResources *res, Dict *dict, OutputD
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;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment