]> git.0d.be Git - empathy.git/commitdiff
Use g_slice_* instead of g_malloc
authorCosimo Cecchi <cosimo.cecchi@collabora.co.uk>
Fri, 15 May 2009 16:28:28 +0000 (18:28 +0200)
committerCosimo Cecchi <cosimoc@gnome.org>
Mon, 1 Jun 2009 15:53:18 +0000 (17:53 +0200)
libempathy/empathy-ft-handler.c

index f9b4a87344a854604acb909776ffaece88a68718..98e4dc6e5cfa7f42c296055b121b4df0d67a4733 100644 (file)
@@ -726,7 +726,7 @@ do_hash_job (GIOSchedulerJob *job,
 
 again:
   if (hash_data->buffer == NULL)
-    hash_data->buffer = g_malloc0 (BUFFER_SIZE);
+    hash_data->buffer = g_slice_alloc0 (BUFFER_SIZE);
 
   bytes_read = g_input_stream_read (hash_data->stream, hash_data->buffer,
                                     BUFFER_SIZE, cancellable, &error);
@@ -742,7 +742,7 @@ again:
       g_io_scheduler_job_send_to_mainloop_async (job, emit_hashing_progress,
           hash_data, NULL);
 
-      g_free (hash_data->buffer);
+      g_slice_free (guchar, hash_data->buffer);
       hash_data->buffer = NULL;
 
       goto again;