Blob Blame History Raw
From 00926ab450074741e2a2b5c699c440e6309e3bff Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pavel=20B=C5=99ezina?= <pbrezina@redhat.com>
Date: Mon, 2 Sep 2019 13:48:13 +0200
Subject: [PATCH 66/90] sss_ptr_hash: keep value pointer when destroying spy
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Oterwise its value in delete callback is NULL.

Reviewed-by: Tomáš Halman <thalman@redhat.com>
---
 src/util/sss_ptr_hash.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/util/sss_ptr_hash.c b/src/util/sss_ptr_hash.c
index bc0db6f48..e8fd19ca8 100644
--- a/src/util/sss_ptr_hash.c
+++ b/src/util/sss_ptr_hash.c
@@ -59,10 +59,10 @@ static int
 sss_ptr_hash_spy_destructor(struct sss_ptr_hash_spy *spy)
 {
     spy->value->spy = NULL;
-    spy->value->ptr = NULL;
 
     /* This results in removing entry from hash table and freeing the value. */
     sss_ptr_hash_delete(spy->table, spy->key, false);
+
     return 0;
 }
 
-- 
2.20.1