Fox missing SMB_MALLOC return checks noticed by "Andreas Moroder <andreas.moroder...
[nivanova/samba-autobuild/.git] / source3 / libnet / libnet_samsync_ldif.c
index f18ba5bc33135d9341c9f1d0716d9b051483c9f1..96bad4da327dce92fd1d2ce64dd0cbc5335aaabe 100644 (file)
@@ -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';
        }