summaryrefslogtreecommitdiff
path: root/ext/intl/msgformat/msgformat_parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/intl/msgformat/msgformat_parse.c')
-rwxr-xr-xext/intl/msgformat/msgformat_parse.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/intl/msgformat/msgformat_parse.c b/ext/intl/msgformat/msgformat_parse.c
index 61c5213f0..8393d4c6e 100755
--- a/ext/intl/msgformat/msgformat_parse.c
+++ b/ext/intl/msgformat/msgformat_parse.c
@@ -40,7 +40,9 @@ static void msgfmt_do_parse(MessageFormatter_object *mfo, char *source, int src_
INTL_METHOD_CHECK_STATUS(mfo, "Converting parse string failed");
umsg_parse_helper(MSG_FORMAT_OBJECT(mfo), &count, &fargs, usource, usrc_len, &INTL_DATA_ERROR_CODE(mfo));
- efree(usource);
+ if (usource) {
+ efree(usource);
+ }
INTL_METHOD_CHECK_STATUS(mfo, "Parsing failed");
array_init(return_value);