MFC: r258020 (by bdrewery)

Remove useless checks for NULL pointer before free(3)

Reported by:		eadler
Approved by:		eadler
This commit is contained in:
bapt 2015-05-30 21:25:32 +00:00
parent 644eb326fc
commit 0f4e3f90c5

View File

@ -321,7 +321,6 @@ free_fingerprint_list(struct fingerprint_list* list)
struct fingerprint *fingerprint, *tmp;
STAILQ_FOREACH_SAFE(fingerprint, list, next, tmp) {
if (fingerprint->name)
free(fingerprint->name);
free(fingerprint);
}
@ -724,11 +723,8 @@ verify_signature(int fd_pkg, int fd_sig)
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);
}