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); } _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"