Fix one more resource leak

This commit is contained in:
vit9696 2019-03-26 14:59:13 +03:00
parent 5edd5c10ee
commit be65f8ae06

View File

@ -2398,7 +2398,10 @@ int i, c, v;
} else {
v = (bl->qty - 1) * len;
if ((bl->qty > 512 || len > 127) &&
v / len != bl->qty - 1) return NULL; /* Overflow */
v / len != bl->qty - 1) {
bstr__free (b);
return NULL; /* Overflow */
}
if (v > INT_MAX - c) {
bstr__free (b);
return NULL; /* Overflow */