check return value before using key_values

there are also mem leask in this function

Signed-off-by: Andrej Gessel <[email protected]>
18 jobs for andiges23-ldb-check-return in 246 minutes and 14 seconds (queued for 1 second)
latest
Status Job ID Name Coverage
  Build
passed #76625962
docker shared
build_ctdb

00:18:34

passed #76625964
docker shared
build_others

00:13:46

passed #76654606
private docker
build_samba

03:18:09

passed #76654871
docker private
build_samba_ad_dc

01:00:28

passed #76625959
docker shared
build_samba_ad_dc_2

00:28:58

passed #76625963
docker shared
build_samba_ctdb

00:34:03

passed #76625967
docker private
build_samba_fileserver

00:20:22

passed #76625960
docker shared
build_samba_libs

00:34:05

passed #76625954
docker shared
build_samba_none_env

00:44:48

passed #76625955
docker shared
build_samba_nopython

00:24:27

passed #76625966
docker private
build_samba_nt4

00:37:04

passed #76625958
docker shared
build_samba_o3

00:34:22

passed #76625961
docker shared
build_samba_static

00:48:02

passed #76625956
docker shared
build_samba_systemkrb5

00:16:57

passed #76625957
docker shared
build_samba_xc

00:06:16

failed #76625965
docker private
build_samba

02:08:12

failed #76625968
docker private
build_samba_ad_dc

00:59:47

failed #76638992
private docker
build_samba_ad_dc

00:47:58