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 <calcurse@cryptocrack.de>
This commit is contained in:
Lukas Fleischer
2014-07-18 08:47:23 +02:00
parent 58f6ac62aa
commit e9d4d3c505
3 changed files with 7 additions and 7 deletions

View File

@@ -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;