MFC: r258020 (by bdrewery)
Remove useless checks for NULL pointer before free(3) Reported by: eadler Approved by: eadler
This commit is contained in:
parent
644eb326fc
commit
0f4e3f90c5
@ -321,8 +321,7 @@ 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->name);
|
||||
free(fingerprint);
|
||||
}
|
||||
free(list);
|
||||
@ -724,12 +723,9 @@ 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->cert);
|
||||
free(sc->sig);
|
||||
free(sc->name);
|
||||
free(sc);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user