From 8e96a87fff4d34a154d1456e9ad47e7b0c322d54 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Mon, 26 Oct 2009 15:17:10 -0700 Subject: Remove all calls to g_strdup_printf Replacing them with calls to talloc_asprintf if possible, otherwise to asprintf (with it's painful error-handling leaving the pointer undefined). --- message-file.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'message-file.c') diff --git a/message-file.c b/message-file.c index 2bd56056..a4c08606 100644 --- a/message-file.c +++ b/message-file.c @@ -75,7 +75,7 @@ notmuch_message_file_open (const char *filename) { notmuch_message_file_t *message; - message = xcalloc (1, sizeof (notmuch_message_file_t)); + message = talloc_zero (NULL, notmuch_message_file_t); message->file = fopen (filename, "r"); if (message->file == NULL) @@ -116,7 +116,7 @@ notmuch_message_file_close (notmuch_message_file_t *message) if (message->file) fclose (message->file); - free (message); + talloc_free (message); } void -- cgit v1.2.3