diff options
author | Loïc Hoguin <[email protected]> | 2018-01-31 17:48:56 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2018-01-31 17:48:56 +0100 |
commit | 91ec77f04ac84ac9941336fe0f6eaf4bd42786cf (patch) | |
tree | dc169d23aee766a1ab522f07e7bb0c575c21d0af /c_src/esdl2_cursors.c | |
parent | 6cb12f50fcbe091de56461100b5d527294405dd9 (diff) | |
download | esdl2-91ec77f04ac84ac9941336fe0f6eaf4bd42786cf.tar.gz esdl2-91ec77f04ac84ac9941336fe0f6eaf4bd42786cf.tar.bz2 esdl2-91ec77f04ac84ac9941336fe0f6eaf4bd42786cf.zip |
Replace malloc/free with enif_alloc/enif_free
Diffstat (limited to 'c_src/esdl2_cursors.c')
-rw-r--r-- | c_src/esdl2_cursors.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/c_src/esdl2_cursors.c b/c_src/esdl2_cursors.c index 569a787..b056c08 100644 --- a/c_src/esdl2_cursors.c +++ b/c_src/esdl2_cursors.c @@ -33,7 +33,7 @@ void esdl2_cursors_insert(SDL_Cursor* cursor, obj_Cursor* res) { struct esdl2_cursor* item; - item = malloc(sizeof(struct esdl2_cursor)); + item = enif_alloc(sizeof(struct esdl2_cursor)); item->cursor = cursor; item->res = res; @@ -89,7 +89,7 @@ void esdl2_cursors_free() head = LIST_FIRST(&cursors); while (head != NULL) { next = LIST_NEXT(head, entries); - free(head); + enif_free(head); head = next; } } |