]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
Revert "Tiny logic simplification: Remove an unnecessary else branch"
authorVolker Lendecke <vl@samba.org>
Fri, 11 Jul 2008 15:45:09 +0000 (17:45 +0200)
committerVolker Lendecke <vl@samba.org>
Fri, 11 Jul 2008 15:53:25 +0000 (17:53 +0200)
This reverts commit 6009ae329375b1c40e3d00df977ddccc8b5cc176.

source/winbindd/idmap_ad.c

index b99da57a4a72e6e3b58258a85ca4b6a55c1cfe9c..2e79413ffc2f8b2835faa23981ff669b32100983 100644 (file)
@@ -77,15 +77,15 @@ static ADS_STRUCT *ad_idmap_cached_connection_internal(void)
 
                if ( ads->config.realm && (expire > time(NULL))) {
                        return ads;
+               } else {
+                       /* we own this ADS_STRUCT so make sure it goes away */
+                       DEBUG(7,("Deleting expired krb5 credential cache\n"));
+                       ads->is_mine = True;
+                       ads_destroy( &ads );
+                       ads_kdestroy(WINBIND_CCACHE_NAME);
+                       ad_idmap_ads = NULL;
+                       TALLOC_FREE( ad_schema );                       
                }
-
-               /* we own this ADS_STRUCT so make sure it goes away */
-               DEBUG(7,("Deleting expired krb5 credential cache\n"));
-               ads->is_mine = True;
-               ads_destroy( &ads );
-               ads_kdestroy(WINBIND_CCACHE_NAME);
-               ad_idmap_ads = NULL;
-               TALLOC_FREE( ad_schema );
        }
 
        if (!local) {