s3-libads: Fix copy&paste error in ads_keytab_add_entry().
authorAndreas Schneider <asn@samba.org>
Mon, 17 Dec 2012 13:33:45 +0000 (14:33 +0100)
committerGünther Deschner <gd@samba.org>
Fri, 21 Dec 2012 12:56:00 +0000 (13:56 +0100)
Found by Coverity.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
source3/libads/kerberos_keytab.c

index b7df50dddf5e5fe08eb348ffb2866c5f855793cd..83df0882f0094e2198600bd5003985075138ef78 100644 (file)
@@ -370,7 +370,7 @@ int ads_keytab_add_entry(ADS_STRUCT *ads, const char *srvPrinc)
                short_princ_s = talloc_asprintf(tmpctx, "%s/%s@%s",
                                                srvPrinc, machine_name,
                                                lp_realm());
-               if (!princ_s) {
+               if (short_princ_s == NULL) {
                        ret = -1;
                        goto out;
                }