[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 1/2] vnc: Drop superfluous conditionals aroun
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v2 1/2] vnc: Drop superfluous conditionals around g_free() |
Date: |
Fri, 06 Jun 2014 11:02:23 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 |
On 06/06/2014 10:47 AM, Markus Armbruster wrote:
> Signed-off-by: Markus Armbruster <address@hidden>
> ---
> ui/vnc-tls.c | 6 ++----
> ui/vnc.c | 12 ++++--------
> 2 files changed, 6 insertions(+), 12 deletions(-)
>
> diff --git a/ui/vnc-tls.c b/ui/vnc-tls.c
> index 50275de..6392326 100644
> --- a/ui/vnc-tls.c
> +++ b/ui/vnc-tls.c
> @@ -443,10 +443,8 @@ static int vnc_set_x509_credential(VncDisplay *vd,
> {
> struct stat sb;
>
> - if (*cred) {
> - g_free(*cred);
> - *cred = NULL;
> - }
> + g_free(*cred);
> + *cred = NULL;
>
> *cred = g_malloc(strlen(certdir) + strlen(filename) + 2);
Still a dead store
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature