summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorKamen Mazdrashki <kamen.mazdrashki@postpath.com>2009-10-24 00:02:24 +0300
committerStefan Metzmacher <metze@samba.org>2009-11-06 14:05:37 +0100
commit39ab7b8ebdefd13fb586d65da76173c0a3fa5fa5 (patch)
tree7a4b5d263fe67b2bbcfa85262351e0a14ebd2045 /source4
parent716eb62b5dab37c203b306047b65280ddf34844a (diff)
downloadsamba-39ab7b8ebdefd13fb586d65da76173c0a3fa5fa5.tar.gz
samba-39ab7b8ebdefd13fb586d65da76173c0a3fa5fa5.tar.bz2
samba-39ab7b8ebdefd13fb586d65da76173c0a3fa5fa5.zip
s4/drs: Fix memory leek in prefixMap
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source4')
-rw-r--r--source4/dsdb/schema/schema_prefixmap.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source4/dsdb/schema/schema_prefixmap.c b/source4/dsdb/schema/schema_prefixmap.c
index 8173f89ece..08e51559d6 100644
--- a/source4/dsdb/schema/schema_prefixmap.c
+++ b/source4/dsdb/schema/schema_prefixmap.c
@@ -155,7 +155,7 @@ WERROR dsdb_schema_pfm_make_attid(struct dsdb_schema_prefixmap *pfm, const char
last_value = strtoul(last_subid, NULL, 10);
/* encode oid in BER format */
- if (!ber_write_OID_String(NULL, &bin_oid, oid)) {
+ if (!ber_write_OID_String(pfm, &bin_oid, oid)) {
return WERR_INTERNAL_ERROR;
}
@@ -186,6 +186,9 @@ WERROR dsdb_schema_pfm_make_attid(struct dsdb_schema_prefixmap *pfm, const char
W_ERROR_NOT_OK_RETURN(werr);
pfm_entry = &pfm->prefixes[idx];
+ } else {
+ /* free memory allocated for bin_oid */
+ data_blob_free(&bin_oid);
}
/* compose the attid */