summaryrefslogtreecommitdiff
path: root/ext/intl/formatter/formatter_parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/intl/formatter/formatter_parse.c')
-rwxr-xr-xext/intl/formatter/formatter_parse.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/ext/intl/formatter/formatter_parse.c b/ext/intl/formatter/formatter_parse.c
index b73095d3e4..cbdde855de 100755
--- a/ext/intl/formatter/formatter_parse.c
+++ b/ext/intl/formatter/formatter_parse.c
@@ -107,7 +107,9 @@ PHP_FUNCTION( numfmt_parse )
ZVAL_LONG(zposition, position);
}
- efree(sstr);
+ if (sstr) {
+ efree(sstr);
+ }
INTL_METHOD_CHECK_STATUS( nfo, "Number parsing failed" );
}
@@ -161,7 +163,9 @@ PHP_FUNCTION( numfmt_parse_currency )
zval_dtor(zposition);
ZVAL_LONG(zposition, position);
}
- efree(sstr);
+ if (sstr) {
+ efree(sstr);
+ }
INTL_METHOD_CHECK_STATUS( nfo, "Number parsing failed" );
/* Convert parsed currency to UTF-8 and pass it back to caller. */