diff options
Diffstat (limited to 'nx-X11/lib/X11/XlcDL.c')
-rw-r--r-- | nx-X11/lib/X11/XlcDL.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/nx-X11/lib/X11/XlcDL.c b/nx-X11/lib/X11/XlcDL.c index 02860a028..2bef4ac12 100644 --- a/nx-X11/lib/X11/XlcDL.c +++ b/nx-X11/lib/X11/XlcDL.c @@ -207,12 +207,13 @@ resolve_object(char *path, const char *lc_name) } if (lc_count == lc_len) { - lc_len += OBJECT_INC_LEN; - xi18n_objects_list = (XI18NObjectsList) - Xrealloc(xi18n_objects_list, - sizeof(XI18NObjectsListRec) * lc_len); - if (!xi18n_objects_list) + int new_len = lc_len + OBJECT_INC_LEN; + XI18NObjectsListRec *tmp = Xrealloc(xi18n_objects_list, + sizeof(XI18NObjectsListRec) * new_len); + if (tmp == NULL) goto done; + xi18n_objects_list = tmp; + lc_len = new_len; } n = parse_line(p, args, 6); |