aboutsummaryrefslogtreecommitdiffstats
path: root/regenc.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-11-26 08:31:27 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-11-26 08:31:27 +0000
commit9ed1d63f41e67b1a2c50171ba9fc99a9b90e93c4 (patch)
treea55f5b8aff31a6765dd5c8514f523d420d3c12a1 /regenc.c
parent360b98355e08c455d627c31c5f63bdda75fe8de2 (diff)
downloadruby-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.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/regenc.c b/regenc.c
index c8f317c8d9..de768efd72 100644
--- a/regenc.c
+++ b/regenc.c
@@ -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;