summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2002-01-05 23:34:06 +0000
committerAndrew Tridgell <tridge@samba.org>2002-01-05 23:34:06 +0000
commitcba3586456925cc6fd91a233f5c84cabb778798c (patch)
treeb470bdd1cfb28a285e79188f88997b1f10d1b633 /source3
parentb0e4827b9750edd358230890fdc671f378da9626 (diff)
downloadsamba-cba3586456925cc6fd91a233f5c84cabb778798c.tar.gz
samba-cba3586456925cc6fd91a233f5c84cabb778798c.tar.bz2
samba-cba3586456925cc6fd91a233f5c84cabb778798c.zip
fixed another DATA_BLOB constructor
(This used to be commit c6affae4bf749a67c90468702eb6d4eeb97a4363)
Diffstat (limited to 'source3')
-rw-r--r--source3/libsmb/asn1.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/source3/libsmb/asn1.c b/source3/libsmb/asn1.c
index 93e95b52bb..1175a7fe65 100644
--- a/source3/libsmb/asn1.c
+++ b/source3/libsmb/asn1.c
@@ -369,13 +369,8 @@ BOOL asn1_read_OctetString(ASN1_DATA *data, DATA_BLOB *blob)
int len;
if (!asn1_start_tag(data, ASN1_OCTET_STRING)) return False;
len = asn1_tag_remaining(data);
- blob->data = malloc(len);
- if (!blob->data) {
- data->has_error = True;
- return False;
- }
+ *blob = data_blob(NULL, len);
asn1_read(data, blob->data, len);
- blob->length = len;
asn1_end_tag(data);
return !data->has_error;
}