summaryrefslogtreecommitdiff
path: root/source3/libnet
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2010-09-09 15:29:03 -0700
committerJeremy Allison <jra@samba.org>2010-09-09 15:29:03 -0700
commit718fd39f10310d10ebc2276021d97d48f1163a88 (patch)
treec3131e859fbf5186596e7f04284095dcde6215c9 /source3/libnet
parente6b85c2a7b3cfa0dd3c9859c88e5462c616d5a2a (diff)
downloadsamba-718fd39f10310d10ebc2276021d97d48f1163a88.tar.gz
samba-718fd39f10310d10ebc2276021d97d48f1163a88.tar.bz2
samba-718fd39f10310d10ebc2276021d97d48f1163a88.zip
Fox missing SMB_MALLOC return checks noticed by "Andreas Moroder <andreas.moroder@gmx.net>".
Jeremy.
Diffstat (limited to 'source3/libnet')
-rw-r--r--source3/libnet/libnet_samsync_ldif.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source3/libnet/libnet_samsync_ldif.c b/source3/libnet/libnet_samsync_ldif.c
index f18ba5bc33..96bad4da32 100644
--- a/source3/libnet/libnet_samsync_ldif.c
+++ b/source3/libnet/libnet_samsync_ldif.c
@@ -83,6 +83,9 @@ static NTSTATUS populate_ldap_for_ldif(const char *sid,
if (suffix_attr == NULL) {
len = strlen(suffix);
suffix_attr = (char*)SMB_MALLOC(len+1);
+ if (!suffix_attr) {
+ return NT_STATUS_NO_MEMORY;
+ }
memcpy(suffix_attr, suffix, len);
suffix_attr[len] = '\0';
}