aboutsummaryrefslogtreecommitdiff
path: root/libcacard/event.c
diff options
context:
space:
mode:
authorMichael Tokarev <mjt@tls.msk.ru>2014-05-08 19:51:01 +0400
committerMichael Tokarev <mjt@tls.msk.ru>2014-05-24 00:07:29 +0400
commit78a4b8d2051bff8e8794e9419b7925122212b096 (patch)
tree687653b7bb47b09b472676db67d50acea37e2cfb /libcacard/event.c
parent6054d883d6138bfc92c73a7c090c824b64086fd2 (diff)
libcacard: g_malloc cleanups
This patch replaces g_malloc() in libcacard into g_new() or g_new0() where appropriate (removing some init-to-zero surrounding code), g_malloc+memcpy into g_memdup() and the like. Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> Reviewed-by: Alon Levy <alevy@redhat.com>
Diffstat (limited to 'libcacard/event.c')
-rw-r--r--libcacard/event.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libcacard/event.c b/libcacard/event.c
index 2d7500fac0..a2e6c7dcd0 100644
--- a/libcacard/event.c
+++ b/libcacard/event.c
@@ -17,7 +17,7 @@ vevent_new(VEventType type, VReader *reader, VCard *card)
{
VEvent *new_vevent;
- new_vevent = (VEvent *)g_malloc(sizeof(VEvent));
+ new_vevent = g_new(VEvent, 1);
new_vevent->next = NULL;
new_vevent->type = type;
new_vevent->reader = vreader_reference(reader);