Change-Id: I845ecb7e7fc6b6242e755a336f0e7e1429ae4bf9
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
if (darray_size(table->strings) > 0.80 * table->index_size) {
table->index_size *= 2;
table->index = realloc(table->index, table->index_size * sizeof(*table->index));
+ if (!table->index)
+ return XKB_ATOM_NONE;
+
memset(table->index, 0, table->index_size * sizeof(*table->index));
for (size_t j = 1; j < darray_size(table->strings); j++) {
const char *s = darray_item(table->strings, j);