From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58293) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WsxGe-0001i0-I4 for qemu-devel@nongnu.org; Fri, 06 Jun 2014 12:45:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WsxGZ-0007X0-Kz for qemu-devel@nongnu.org; Fri, 06 Jun 2014 12:45:24 -0400 Received: from mx1.redhat.com ([209.132.183.28]:7651) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WsxGZ-0007Ws-Bq for qemu-devel@nongnu.org; Fri, 06 Jun 2014 12:45:19 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s56GjIGg015324 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 6 Jun 2014 12:45:18 -0400 Message-ID: <5391F01D.8040605@redhat.com> Date: Fri, 06 Jun 2014 10:45:17 -0600 From: Eric Blake MIME-Version: 1.0 References: <1402072618-7103-1-git-send-email-armbru@redhat.com> <1402072618-7103-2-git-send-email-armbru@redhat.com> In-Reply-To: <1402072618-7103-2-git-send-email-armbru@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="9OXw9n667MW9Eh6Vq6KBTjmQaXak5s40g" Subject: Re: [Qemu-devel] [PATCH 1/2] vnc: Drop superfluous conditionals around g_free() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster , qemu-devel@nongnu.org Cc: kraxel@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --9OXw9n667MW9Eh6Vq6KBTjmQaXak5s40g Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 06/06/2014 10:36 AM, Markus Armbruster wrote: > Signed-off-by: Markus Armbruster > --- > ui/vnc-tls.c | 6 ++---- > ui/vnc.c | 12 ++++-------- > 2 files changed, 6 insertions(+), 12 deletions(-) >=20 > 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; > =20 > - if (*cred) { > - g_free(*cred); > - *cred =3D NULL; > - } > + g_free(*cred); > + *cred =3D NULL; > =20 > *cred =3D g_malloc(strlen(certdir) + strlen(filename) + 2); Makes a dead store to *cred more obvious. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --9OXw9n667MW9Eh6Vq6KBTjmQaXak5s40g Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJTkfAeAAoJEKeha0olJ0Nq8IAIAJdLDiwB5ZIb5D8mOMEYHPM6 jU+fMo7/tqIe14irjB2Vj4XHiKGAe5+1JE2vyJ43ytEIkGHs8FCHGicv6CUOuQZR 3u0qZeyyNd4ytcA3KJOdrrJcWWuha2vxVVvg0wULom3f3ve1akV2Rnipx6GxfzQj Phge3bozF9pJDnNOJcNZzedhiZfupgCG7aDfKy4w9EUaqn6UVnM7caSiIuRb6Ey3 uGoRlIJlhcgcGOBUFL2LAwc4I9qz9YqhsO94CnVPFKb/qyROZhaKlcCQGLxzxZab arhKTi0q40BgKr6tFMdQHdIRVQfRlp6UPN46Lpit/mqcwkdDEyS3vMaBvNXtYJ0= =bWpg -----END PGP SIGNATURE----- --9OXw9n667MW9Eh6Vq6KBTjmQaXak5s40g--