Fix Coverity ID 551
authorVolker Lendecke <vl@samba.org>
Sat, 8 Mar 2008 22:48:12 +0000 (23:48 +0100)
committerVolker Lendecke <vl@samba.org>
Sat, 8 Mar 2008 22:48:12 +0000 (23:48 +0100)
Correctly return if we can't create the temporary krb5.conf

Jeremy, please check!

source/libads/kerberos.c

index b37b9a500fb97d12b91097649e54c2a4ea96023f..ee25fb5551709276021bd6ed1f4edd15f594f21b 100644 (file)
@@ -894,6 +894,8 @@ bool create_local_private_krb5_conf_for_domain(const char *realm,
                DEBUG(0,("create_local_private_krb5_conf_for_domain: smb_mkstemp failed,"
                        " for file %s. Errno %s\n",
                        tmpname, strerror(errno) ));
+               TALLOC_FREE(dname);
+               return false;
        }
 
        if (fchmod(fd, 0644)==-1) {