diff options
author | Andrew Tridgell <tridge@samba.org> | 2007-05-21 06:12:06 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:52:42 -0500 |
commit | 7bb939b1cb2b39a8271cf16d9f5fce5312a9af10 (patch) | |
tree | 3210fa30663556e6ff238a3c9f6d17a209bf26b4 /source4/ldap_server | |
parent | 042ddf28ec036141b2457eb4bf6d2b0cec5cc790 (diff) | |
download | samba-7bb939b1cb2b39a8271cf16d9f5fce5312a9af10.tar.gz samba-7bb939b1cb2b39a8271cf16d9f5fce5312a9af10.tar.bz2 samba-7bb939b1cb2b39a8271cf16d9f5fce5312a9af10.zip |
r23030: finally fixed up our asn1 code to use better memory allocation. This
should allow us to fix some long standing memory leaks.
(This used to be commit 3db49c2ec9968221c1361785b94061046ecd159d)
Diffstat (limited to 'source4/ldap_server')
-rw-r--r-- | source4/ldap_server/ldap_server.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source4/ldap_server/ldap_server.c b/source4/ldap_server/ldap_server.c index 738215cda5..9aefbed485 100644 --- a/source4/ldap_server/ldap_server.c +++ b/source4/ldap_server/ldap_server.c @@ -134,26 +134,26 @@ static NTSTATUS ldapsrv_decode(void *private, DATA_BLOB blob) NTSTATUS status; struct ldapsrv_connection *conn = talloc_get_type(private, struct ldapsrv_connection); - struct asn1_data asn1; + struct asn1_data *asn1 = asn1_init(conn); struct ldap_message *msg = talloc(conn, struct ldap_message); if (msg == NULL) { return NT_STATUS_NO_MEMORY; } - if (!asn1_load(&asn1, blob)) { + if (!asn1_load(asn1, blob)) { return NT_STATUS_NO_MEMORY; } - status = ldap_decode(&asn1, msg); + status = ldap_decode(asn1, msg); if (!NT_STATUS_IS_OK(status)) { - asn1_free(&asn1); + asn1_free(asn1); return status; } data_blob_free(&blob); ldapsrv_process_message(conn, msg); - asn1_free(&asn1); + asn1_free(asn1); return NT_STATUS_OK; } |