[gnome-software] trivial: Use GSlice when allocating plugins



commit 779a23b2c2d4a003646bddfd36280071fdd9a9be
Author: Richard Hughes <richard hughsie com>
Date:   Thu Mar 7 21:59:58 2013 +0000

    trivial: Use GSlice when allocating plugins

 src/gs-plugin-loader.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/gs-plugin-loader.c b/src/gs-plugin-loader.c
index 188b766..46b1d52 100644
--- a/src/gs-plugin-loader.c
+++ b/src/gs-plugin-loader.c
@@ -526,7 +526,7 @@ gs_plugin_loader_open_plugin (GsPluginLoader *plugin_loader,
        }
 
        /* print what we know */
-       plugin = g_new0 (GsPlugin, 1);
+       plugin = g_slice_new0 (GsPlugin);
        plugin->enabled = FALSE;
        plugin->module = module;
        plugin->pixbuf_size = 64;
@@ -638,7 +638,7 @@ gs_plugin_loader_plugin_free (GsPlugin *plugin)
        g_free (plugin->name);
        g_module_close (plugin->module);
        g_timer_destroy (plugin->timer);
-       g_free (plugin);
+       g_slice_free (GsPlugin, plugin);
 }
 
 /**


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]