Date: Sat, 30 May 2015 21:25:33 +0000 (UTC) From: Baptiste Daroussin <bapt@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283788 - stable/10/usr.sbin/pkg Message-ID: <201505302125.t4ULPX6B037025@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bapt Date: Sat May 30 21:25:32 2015 New Revision: 283788 URL: https://svnweb.freebsd.org/changeset/base/283788 Log: MFC: r258020 (by bdrewery) Remove useless checks for NULL pointer before free(3) Reported by: eadler Approved by: eadler Modified: stable/10/usr.sbin/pkg/pkg.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/pkg/pkg.c ============================================================================== --- stable/10/usr.sbin/pkg/pkg.c Sat May 30 21:23:41 2015 (r283787) +++ stable/10/usr.sbin/pkg/pkg.c Sat May 30 21:25:32 2015 (r283788) @@ -321,8 +321,7 @@ free_fingerprint_list(struct fingerprint struct fingerprint *fingerprint, *tmp; STAILQ_FOREACH_SAFE(fingerprint, list, next, tmp) { - if (fingerprint->name) - free(fingerprint->name); + free(fingerprint->name); free(fingerprint); } free(list); @@ -724,12 +723,9 @@ cleanup: if (revoked) free_fingerprint_list(revoked); if (sc) { - if (sc->cert) - free(sc->cert); - if (sc->sig) - free(sc->sig); - if (sc->name) - free(sc->name); + free(sc->cert); + free(sc->sig); + free(sc->name); free(sc); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201505302125.t4ULPX6B037025>