]> git.notmuchmail.org Git - notmuch/blobdiff - notmuch-reply.c
Fix double free in guess_from_received_header().
[notmuch] / notmuch-reply.c
index 5265af6dde0adce2c43e2944c3d221b0a00c1cce..dab69e664b6ee2f949b48106c15c8ea0dfd09e36 100644 (file)
@@ -406,6 +406,7 @@ guess_from_received_header (notmuch_config_t *config, notmuch_message_t *message
        /* Now extract the last two components of the MTA host name
         * as domain and tld.
         */
+       domain = tld = NULL;
        while ((ptr = strsep (&token, delim)) != NULL) {
            if (*ptr == '\0')
                continue;
@@ -607,7 +608,7 @@ notmuch_reply_command (void *ctx, int argc, char *argv[])
            }
        } else if ((STRNCMP_LITERAL (argv[i], "--decrypt") == 0)) {
            if (params.cryptoctx == NULL) {
-               GMimeSession* session = g_object_new(notmuch_gmime_session_get_type(), NULL);
+               GMimeSession* session = g_object_new(g_mime_session_get_type(), NULL);
                if (NULL == (params.cryptoctx = g_mime_gpg_context_new(session, "gpg")))
                    fprintf (stderr, "Failed to construct gpg context.\n");
                else