From e9d4d3c505114114366cc0102ee92ce2e0d779dc Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Fri, 18 Jul 2014 08:47:23 +0200 Subject: Do not use malloc() or xmalloc() Use mem_malloc() instead which automatically picks the right implementation depending on whether memory debugging is enabled or not. Signed-off-by: Lukas Fleischer --- src/listbox.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/listbox.c') diff --git a/src/listbox.c b/src/listbox.c index c886dce..a109b7f 100644 --- a/src/listbox.c +++ b/src/listbox.c @@ -97,8 +97,8 @@ void listbox_load_items(struct listbox *lb, int item_count) free(lb->type); free(lb->ch); - lb->type = xmalloc(item_count * sizeof(unsigned)); - lb->ch = xmalloc((item_count + 1) * sizeof(unsigned)); + lb->type = mem_malloc(item_count * sizeof(unsigned)); + lb->ch = mem_malloc((item_count + 1) * sizeof(unsigned)); for (i = 0, ch = 0; i < item_count; i++) { lb->type[i] = lb->fn_type(i, lb->cb_data); lb->ch[i] = ch; -- cgit v1.2.3-54-g00ecf