summaryrefslogtreecommitdiff
path: root/src/GetResList.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/GetResList.c')
-rw-r--r--src/GetResList.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/GetResList.c b/src/GetResList.c
index 3bb2387..cc3ee4e 100644
--- a/src/GetResList.c
+++ b/src/GetResList.c
@@ -90,8 +90,9 @@ XtGetResourceList(WidgetClass widget_class,
register XtResourceList *list, dlist;
LOCK_PROCESS;
+ *resources = XtMallocArray(widget_class->core_class.num_resources,
+ (Cardinal) sizeof(XtResource));
size = (int) (widget_class->core_class.num_resources * sizeof(XtResource));
- *resources = (XtResourceList) __XtMalloc((unsigned) size);
if (!widget_class->core_class.class_inited) {
/* Easy case */
@@ -162,8 +163,9 @@ XtGetConstraintResourceList(WidgetClass widget_class,
return;
}
+ *resources = XtMallocArray(class->constraint_class.num_resources,
+ (Cardinal) sizeof(XtResource));
size = (int) (class->constraint_class.num_resources * sizeof(XtResource));
- *resources = (XtResourceList) __XtMalloc((unsigned) size);
if (!class->core_class.class_inited) {
/* Easy case */