Blame SOURCES/nss-3.79-fix-client-cert-crash.patch

2a00fe
diff --git a/lib/ssl/authcert.c b/lib/ssl/authcert.c
2a00fe
--- a/lib/ssl/authcert.c
2a00fe
+++ b/lib/ssl/authcert.c
2a00fe
@@ -212,17 +212,17 @@ NSS_GetClientAuthData(void *arg,
2a00fe
                                                pw_arg);
2a00fe
         } else {
2a00fe
             int nnames = 0;
2a00fe
             char **names = ssl_DistNamesToStrings(caNames, &nnames);
2a00fe
             rv = CERT_FilterCertListByCANames(certList, nnames, names,
2a00fe
                                               certUsageSSLClient);
2a00fe
             ssl_FreeDistNamesStrings(names, nnames);
2a00fe
         }
2a00fe
-        if ((rv != SECSuccess) || CERT_LIST_EMPTY(certList)) {
2a00fe
+        if ((rv != SECSuccess) || (certList && CERT_LIST_EMPTY(certList))) {
2a00fe
             CERT_DestroyCertList(certList);
2a00fe
             certList = NULL;
2a00fe
         }
2a00fe
     }
2a00fe
     if (certList == NULL) {
2a00fe
         /* no user certs meeting the nickname/usage requirements found */
2a00fe
         return SECFailure;
2a00fe
     }
2a00fe