summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/common/ldb_dn.c
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2006-11-25 17:19:42 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:28:33 -0500
commiteee64196a3b6433606a436bba3ab36896fdada18 (patch)
tree439df475e812620e9443758b330284e80152a245 /source4/lib/ldb/common/ldb_dn.c
parenta98d02c2f4f649a2c437bb3821b32fb83deea7c0 (diff)
downloadsamba-eee64196a3b6433606a436bba3ab36896fdada18.tar.gz
samba-eee64196a3b6433606a436bba3ab36896fdada18.tar.bz2
samba-eee64196a3b6433606a436bba3ab36896fdada18.zip
r19901: Fix a potential NULL dereference
(This used to be commit 75e6fb9654f10a076ed49b0582b40368e149d30a)
Diffstat (limited to 'source4/lib/ldb/common/ldb_dn.c')
-rw-r--r--source4/lib/ldb/common/ldb_dn.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source4/lib/ldb/common/ldb_dn.c b/source4/lib/ldb/common/ldb_dn.c
index 38d9ea3aff..f76c3441e7 100644
--- a/source4/lib/ldb/common/ldb_dn.c
+++ b/source4/lib/ldb/common/ldb_dn.c
@@ -251,6 +251,9 @@ static bool ldb_dn_explode(struct ldb_dn *dn)
/* Components data space is allocated here once */
data = talloc_array(dn->components, char, strlen(dn->linearized) + 1);
+ if (!data) {
+ return false;
+ }
p = dn->linearized;
in_attr = true;