diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-11-26 08:31:27 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-11-26 08:31:27 +0000 |
commit | 9ed1d63f41e67b1a2c50171ba9fc99a9b90e93c4 (patch) | |
tree | a55f5b8aff31a6765dd5c8514f523d420d3c12a1 /regenc.c | |
parent | 360b98355e08c455d627c31c5f63bdda75fe8de2 (diff) | |
download | ruby-9ed1d63f41e67b1a2c50171ba9fc99a9b90e93c4.tar.gz |
* regcomp.c, regenc.c, regexec.c, regint.h, enc/unicode.c:
Merge Onigmo 58fa099ed1a34367de67fb3d06dd48d076839692
+ https://github.com/k-takata/Onigmo/pull/52
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'regenc.c')
-rw-r--r-- | regenc.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -902,13 +902,15 @@ resize_property_list(int new_size, const OnigCodePoint*** plist, int* psize) size = sizeof(OnigCodePoint*) * new_size; if (IS_NULL(list)) { list = (const OnigCodePoint** )xmalloc(size); + if (IS_NULL(list)) return ONIGERR_MEMORY; } else { - list = (const OnigCodePoint** )xrealloc((void* )list, size); + const OnigCodePoint **tmp; + tmp = (const OnigCodePoint** )xrealloc((void* )list, size); + if (IS_NULL(tmp)) return ONIGERR_MEMORY; + list = tmp; } - if (IS_NULL(list)) return ONIGERR_MEMORY; - *plist = list; *psize = new_size; |