Re: [PATCH] lib/message.cc: fix Coverity finding (use after free)

Subject: Re: [PATCH] lib/message.cc: fix Coverity finding (use after free)

Date: Sat, 18 Mar 2017 21:14:26 -0300

To: Tomi Ollila, notmuch@notmuchmail.org

Cc: tomi.ollila@iki.fi

From: David Bremner


Tomi Ollila <tomi.ollila@iki.fi> writes:

> -	const char *data;
>  
> -	data = message->doc.get_data ().c_str ();
> +	std::string datastr = message->doc.get_data ();
> +	const char *data = datastr.c_str ();
>  

Pushed,

d

Thread: