[epiphany] ephy-session: use g_slice_new for SessionCommand structure



commit 1d8d37e885f68852cfdee982d573644a5aa0b6f5
Author: Xan Lopez <xan igalia com>
Date:   Fri Mar 30 11:58:28 2012 +0200

    ephy-session: use g_slice_new for SessionCommand structure

 src/ephy-session.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/src/ephy-session.c b/src/ephy-session.c
index 2096bcf..b12cd98 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;



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