[balsa] Use g_new instead of malloc



commit b9228c91bd198c72d64462ce2d01734c4eb08500
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Tue Apr 27 17:47:22 2010 -0400

    Use g_new instead of malloc
    
    	* libbalsa/send.h: allocate message with g_new instead of
    	malloc, since we g_free it.

 ChangeLog       |    5 +++++
 libbalsa/send.h |    2 +-
 2 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index f43786d..29a5648 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-04-27  Peter Bloomfield
+
+	* libbalsa/send.h: allocate message with g_new instead of
+	malloc, since we g_free it.
+
 2010-04-26  Albrecht DreÃ?
 
 	* libbalsa/rfc3156.c (libbalsa_check_crypto_engine): add hint
diff --git a/libbalsa/send.h b/libbalsa/send.h
index b21ac52..5cf617a 100644
--- a/libbalsa/send.h
+++ b/libbalsa/send.h
@@ -107,7 +107,7 @@ typedef struct {
 } SendThreadMessage;
 
 #define  MSGSENDTHREAD(t_message, type, string, s_msg, s_mbox, messof) \
-  t_message = malloc( sizeof( SendThreadMessage )); \
+  t_message = g_new(SendThreadMessage, 1); \
   t_message->message_type = type; \
   strncpy(t_message->message_string, string, sizeof(t_message->message_string)); \
   t_message->msg = s_msg; \



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