Fixed another resource leak in the PGC code.

This commit is contained in:
OBattler
2020-01-14 22:41:37 +01:00
parent a219d48061
commit 6217904ac9

View File

@@ -2033,7 +2033,10 @@ pgc_parse_words(pgc_t *dev, pgc_cl_t *cl, int count)
}
for (n = 0; n < count; n++) {
if (! pgc_param_word(dev, &param[n])) return 0;
if (! pgc_param_word(dev, &param[n])) {
free(param);
return 0;
}
if (!pgc_cl_append(cl, param[n] & 0xff) ||
!pgc_cl_append(cl, param[n] >> 8)) {