r9310: Add two missing return statements after null pointer checks to fix potential...
authorSteve French <sfrench@samba.org>
Mon, 15 Aug 2005 23:52:15 +0000 (23:52 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:33:23 +0000 (13:33 -0500)
Found by coverity.
(This used to be commit 3b707b928969c87ac7e9948a567a3ebbc754f28c)

source4/kdc/hdb-ldb.c

index 651aa2347a0e7711c4b2e4e335e86f75bfa4834e..0aa18423a042ab4d75b6245ed5afeb61b50823db 100644 (file)
@@ -644,6 +644,7 @@ static krb5_error_code LDB_lookup_spn_alias(krb5_context context, struct ldb_con
        if (!spnmappings || spnmappings->num_values == 0) {
                krb5_warnx(context, "ldb_search: dn: %s no sPNMappings attribute", service_dn);
                krb5_set_error_string(context, "ldb_search: dn: %s no sPNMappings attribute", service_dn);
+               return HDB_ERR_NOENTRY;
        }
 
        for (i = 0; i < spnmappings->num_values; i++) {
@@ -664,6 +665,7 @@ static krb5_error_code LDB_lookup_spn_alias(krb5_context context, struct ldb_con
                                   service_dn, mapping);
                        krb5_set_error_string(context, "ldb_search: dn: %s sPNMapping malformed: %s", 
                                              service_dn, mapping);
+                       return HDB_ERR_NOENTRY;
                }
                p[0] = '\0';
                p++;