From 1d8d37e885f68852cfdee982d573644a5aa0b6f5 Mon Sep 17 00:00:00 2001 From: Xan Lopez Date: Fri, 30 Mar 2012 11:58:28 +0200 Subject: ephy-session: use g_slice_new for SessionCommand structure --- src/ephy-session.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/ephy-session.c b/src/ephy-session.c index 2096bcfe4..b12cd984d 100644 --- a/src/ephy-session.c +++ b/src/ephy-session.c @@ -211,7 +211,7 @@ session_command_free (SessionCommand *cmd) g_strfreev (cmd->args); } - g_free (cmd); + g_slice_free (SessionCommand, cmd); g_object_unref (ephy_shell_get_default ()); } @@ -1362,8 +1362,7 @@ ephy_session_queue_command (EphySession *session, } } - /* FIXME: use g_slice_new */ - cmd = g_new0 (SessionCommand, 1); + cmd = g_slice_new0 (SessionCommand); cmd->command = command; cmd->arg = arg ? g_strdup (arg) : NULL; cmd->args = args ? g_strdupv ((gchar **)args) : NULL; -- cgit v1.2.3