summaryrefslogtreecommitdiff
path: root/cord
diff options
context:
space:
mode:
Diffstat (limited to 'cord')
-rw-r--r--cord/cordbscs.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/cord/cordbscs.c b/cord/cordbscs.c
index 924bf44..5128daf 100644
--- a/cord/cordbscs.c
+++ b/cord/cordbscs.c
@@ -188,6 +188,7 @@ CORD CORD_cat_char_star(CORD x, const char * y, size_t leny)
result_len = right_len + leny; /* length of new_right */
if (result_len <= SHORT_LIMIT) {
new_right = GC_MALLOC_ATOMIC(result_len + 1);
+ if (new_right == 0) OUT_OF_MEMORY;
memcpy(new_right, right, right_len);
memcpy(new_right + right_len, y, leny);
new_right[result_len] = '\0';