]> git.ipfire.org Git - thirdparty/samba.git/commit
ldb: Fix mem-leak if talloc_realloc fails
authorSwen Schillig <swen@linux.ibm.com>
Wed, 31 Jul 2019 08:27:37 +0000 (10:27 +0200)
committerAndrew Bartlett <abartlet@samba.org>
Sat, 10 Aug 2019 19:24:29 +0000 (19:24 +0000)
commit99b4791cfe423b19f1f21d5f9fb42157336019f1
tree3d3e91fa81a30b6416aa8cb1d0eebda17d2655fa
parent5eb4d705396faa5e5de90aaa86f7115b0f005589
ldb: Fix mem-leak if talloc_realloc fails

In case of a failing talloc_realloc(), the only reference
to the originally allocated memory is overwritten.
Instead use a temp var until success is verified.

Signed-off-by: Swen Schillig <swen@linux.ibm.com>
Reviewed-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Matthias Dieter Wallnöfer <mdw@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
lib/ldb/common/ldb_dn.c