encode_openldap_dereference: write out the linearised control
authorAndrew Bartlett <abartlet@samba.org>
Wed, 10 Dec 2008 03:22:40 +0000 (14:22 +1100)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 10 Dec 2008 03:22:40 +0000 (14:22 +1100)
source4/libcli/ldap/ldap_controls.c

index 1f2d0d4..f4adc50 100644 (file)
@@ -1123,6 +1123,12 @@ static bool encode_openldap_dereference(void *mem_ctx, void *in, DATA_BLOB *out)
                asn1_pop_tag(data);
        }
        asn1_pop_tag(data);
+
+       *out = data_blob_talloc(mem_ctx, data->data, data->length);
+       if (out->data == NULL) {
+               return false;
+       }
+       talloc_free(data);
        return true;
 }