summaryrefslogtreecommitdiff
path: root/ext/intl/dateformat/dateformat_attr.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/intl/dateformat/dateformat_attr.c')
-rwxr-xr-xext/intl/dateformat/dateformat_attr.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/intl/dateformat/dateformat_attr.c b/ext/intl/dateformat/dateformat_attr.c
index 7c6cef953..6131cedc9 100755
--- a/ext/intl/dateformat/dateformat_attr.c
+++ b/ext/intl/dateformat/dateformat_attr.c
@@ -276,7 +276,9 @@ PHP_FUNCTION( datefmt_set_pattern )
udat_applyPattern(DATE_FORMAT_OBJECT(dfo), (UBool)is_pattern_localized, svalue, slength);
- efree(svalue);
+ if (svalue) {
+ efree(svalue);
+ }
INTL_METHOD_CHECK_STATUS(dfo, "Error setting symbol value");
RETURN_TRUE;