diff options
author | Lukas Fleischer <calcurse@cryptocrack.de> | 2014-07-18 08:47:23 +0200 |
---|---|---|
committer | Lukas Fleischer <calcurse@cryptocrack.de> | 2014-07-18 08:47:23 +0200 |
commit | e9d4d3c505114114366cc0102ee92ce2e0d779dc (patch) | |
tree | ba4125df88d405f172c76f6eab00d6299d408bc1 /src/listbox.c | |
parent | 58f6ac62aaf38b0122e304a09c2a589743a7e215 (diff) | |
download | calcurse-e9d4d3c505114114366cc0102ee92ce2e0d779dc.zip |
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>
Diffstat (limited to 'src/listbox.c')
-rw-r--r-- | src/listbox.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; |