diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-10-29 12:25:45 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-10-29 12:25:45 +0000 |
commit | 4beb2f2970d709169db316483a6bc547fdcaba8d (patch) | |
tree | 66c3f0e934b8eb4905e408356167bec326ebfa8e /src/libstat/backends/mmaped_file.c | |
parent | a47922458216ce76eb5c591096cb8d4bd41f03c3 (diff) | |
download | rspamd-4beb2f2970d709169db316483a6bc547fdcaba8d.tar.gz rspamd-4beb2f2970d709169db316483a6bc547fdcaba8d.zip |
[Minor] Final stage of g_slice removal
Diffstat (limited to 'src/libstat/backends/mmaped_file.c')
-rw-r--r-- | src/libstat/backends/mmaped_file.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libstat/backends/mmaped_file.c b/src/libstat/backends/mmaped_file.c index 65ccb5aa1..b3861ca96 100644 --- a/src/libstat/backends/mmaped_file.c +++ b/src/libstat/backends/mmaped_file.c @@ -597,13 +597,13 @@ rspamd_mmaped_file_open (rspamd_mempool_t *pool, size); } - new_file = g_slice_alloc0 (sizeof (rspamd_mmaped_file_t)); + new_file = g_malloc0 (sizeof (rspamd_mmaped_file_t)); if ((new_file->fd = open (filename, O_RDWR)) == -1) { msg_info_pool ("cannot open file %s, error %d, %s", filename, errno, strerror (errno)); - g_slice_free1 (sizeof (*new_file), new_file); + g_free (new_file); return NULL; } @@ -615,7 +615,7 @@ rspamd_mmaped_file_open (rspamd_mempool_t *pool, filename, errno, strerror (errno)); - g_slice_free1 (sizeof (*new_file), new_file); + g_free (new_file); return NULL; } @@ -632,7 +632,7 @@ rspamd_mmaped_file_open (rspamd_mempool_t *pool, filename, errno, strerror (errno)); - g_slice_free1 (sizeof (*new_file), new_file); + g_free (new_file); return NULL; } @@ -640,7 +640,7 @@ rspamd_mmaped_file_open (rspamd_mempool_t *pool, close (new_file->fd); rspamd_file_unlock (new_file->fd, FALSE); munmap (new_file->map, st.st_size); - g_slice_free1 (sizeof (*new_file), new_file); + g_free (new_file); return NULL; } @@ -669,7 +669,7 @@ rspamd_mmaped_file_close_file (rspamd_mempool_t *pool, close (file->fd); } - g_slice_free1 (sizeof (*file), file); + g_free (file); return 0; } |