libsmb: Fix removing invalid samlogon cache entries
authorVolker Lendecke <vl@samba.org>
Fri, 12 Dec 2014 10:39:25 +0000 (11:39 +0100)
committerJeremy Allison <jra@samba.org>
Fri, 12 Dec 2014 19:47:06 +0000 (20:47 +0100)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/libsmb/samlogon_cache.c

index 1f1ab1d46e8b38bf65f62295a7d0b2f33fde3844..0041a77c888a166f2048005d1f4bf1b89b67c945 100644 (file)
@@ -247,7 +247,7 @@ struct netr_SamInfo3 *netsamlogon_cache_get(TALLOC_CTX *mem_ctx, const struct do
 
        if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
                DEBUG(0,("netsamlogon_cache_get: failed to pull entry from cache\n"));
-               tdb_delete(netsamlogon_tdb, data);
+               tdb_delete_bystring(netsamlogon_tdb, keystr);
                TALLOC_FREE(info3);
                goto done;
        }