Skip to content

Commit ab641de

Browse files
committed
Delete unnecessary bc_free_num when calculation fails
1 parent de3e83b commit ab641de

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

ext/bcmath/bcmath.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1399,19 +1399,16 @@ static void bcmath_number_calc_method(INTERNAL_FUNCTION_PARAMETERS, uint8_t opco
13991399
break;
14001400
case ZEND_DIV:
14011401
if (UNEXPECTED(bcmath_number_div_internal(intern->num, num, &ret, intern->scale, &scale, scale_is_null) == FAILURE)) {
1402-
bc_free_num(&ret);
14031402
goto fail;
14041403
}
14051404
break;
14061405
case ZEND_MOD:
14071406
if (UNEXPECTED(bcmath_number_mod_internal(intern->num, num, &ret, intern->scale, num_full_scale, &scale, scale_is_null) == FAILURE)) {
1408-
bc_free_num(&ret);
14091407
goto fail;
14101408
}
14111409
break;
14121410
case ZEND_POW:
14131411
if (UNEXPECTED(bcmath_number_pow_internal(intern->num, num, &ret, intern->scale, &scale, scale_is_null, false) == FAILURE)) {
1414-
bc_free_num(&ret);
14151412
goto fail;
14161413
}
14171414
break;

0 commit comments

Comments
 (0)