Fixed resource leaks in the Image Manager 1024 code.

This commit is contained in:
OBattler
2020-01-14 23:04:38 +01:00
parent 100aaa0115
commit a8a67364d8

View File

@@ -544,8 +544,20 @@ hndl_poly(pgc_t *pgc)
}
for (n = 0; n < count; n++) {
if (! pgc_param_word(pgc, &xw)) return;
if (! pgc_param_word(pgc, &yw)) return;
if (! pgc_param_word(pgc, &xw)) {
if (x)
free(x);
if (y)
free(y);
return;
}
if (! pgc_param_word(pgc, &yw)) {
if (x)
free(x);
if (y)
free(y);
return;
}
/* Skip degenerate line segments. */
if (realcount > 0 &&