s4 dsdb: fix use after free in samldb_rename_search_base_callback

Fix use after free detected by AddressSanitizer

AddressSanitizer: heap-use-after-free on address 0x60f0002b2738
                  at pc 0x7f89b1a213b5 bp 0x7ffce9528810 sp 0x7ffce9528800
                  READ of size 8 at 0x60f0002b2738 thread T0
    #0 0x7f89b1a213b4 in samldb_rename_search_base_callback
        ../../source4/dsdb/samdb/ldb_modules/samldb.c:4203
    #1 0x7f89d3a0db4a in ldb_module_send_entry
        ../../lib/ldb/common/ldb_modules.c:793
    #2 0x7f89b6f27356 in es_callback
        ../../source4/dsdb/samdb/ldb_modules/encrypted_secrets.c:1418

Bug: https://bugzilla.samba.org/show_bug.cgi?id=13942

Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit b0cc6d21)
23 jobs for gary-bug-13942-v4-10 in 315 minutes and 59 seconds (queued for 2 seconds)
Status Job ID Name Coverage
  Build
passed #212544616
docker shared
build_ctdb

00:35:54

passed #212544618
docker shared
build_others

00:15:18

passed #212616030
private docker
build_samba

03:38:45

passed #212544624
docker private
build_samba_ad_dc

01:37:03

passed #212544608
docker shared
build_samba_ad_dc_2

00:28:34

passed #212544611
docker shared
build_samba_ad_dc_2_py2

00:18:17

passed #212544609
docker shared
build_samba_ad_dc_backup

00:29:16

passed #212544610
docker shared
build_samba_ad_dc_backup_py2

00:15:43

passed #212544625
docker private
build_samba_ad_dc_py2

00:20:03

passed #212544619
docker shared
build_samba_buildpy2_only

00:16:33

passed #212544617
docker shared
build_samba_ctdb

00:19:17

passed #212544623
docker private
build_samba_fileserver

00:40:54

passed #212544612
docker shared
build_samba_libs

00:20:24

passed #212544613
docker shared
build_samba_libs_py2

00:32:41

passed #212544602
docker shared
build_samba_none_env

00:48:57

passed #212544603
docker shared
build_samba_none_env_py2

00:26:05

passed #212544604
docker shared
build_samba_nopython

00:18:21

passed #212544607
docker shared
build_samba_o3

00:31:48

passed #212544621
docker private
build_samba_py2

01:34:55

passed #212544615
docker shared
build_samba_static

00:43:25

passed #212544605
docker shared
build_samba_systemkrb5

00:13:44

passed #212544606
shared docker
build_samba_xc

00:07:56

canceled #212544620
docker private
build_samba

04:43:29