Skip to content

Commit 79b987e

Browse files
committed
use ZendMM
1 parent a71f6c8 commit 79b987e

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

ext/session/mod_mm.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ static void ps_mm_destroy(ps_mm *data)
169169

170170
g_hash_table_destroy(data->hash);
171171
g_mapped_file_unref(data->mm);
172-
free(data);
172+
efree(data);
173173
}
174174

175175
PHP_MINIT_FUNCTION(ps_mm)
@@ -180,13 +180,13 @@ PHP_MINIT_FUNCTION(ps_mm)
180180
char *ps_mm_path, euid[30];
181181
zend_result ret;
182182

183-
ps_mm_instance = calloc(1, sizeof(*ps_mm_instance));
183+
ps_mm_instance = ecalloc(1, sizeof(*ps_mm_instance));
184184
if (!ps_mm_instance) {
185185
return FAILURE;
186186
}
187187

188188
if (!(euid_len = slprintf(euid, sizeof(euid), "%d", geteuid()))) {
189-
free(ps_mm_instance);
189+
efree(ps_mm_instance);
190190
ps_mm_instance = NULL;
191191
return FAILURE;
192192
}

0 commit comments

Comments
 (0)