summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-11-04 23:12:44 +0000
committerAndrew Tridgell <tridge@samba.org>2003-11-04 23:12:44 +0000
commit18d7a41acec8202b29c152f17bca3f7fe8d44ac0 (patch)
tree1710f9dc1d68c9fc88acf4c400adfa8054ff476a /source4
parentc1b3ebb1fa51a8b91e94d48ec272846235de1c03 (diff)
downloadsamba-18d7a41acec8202b29c152f17bca3f7fe8d44ac0.tar.gz
samba-18d7a41acec8202b29c152f17bca3f7fe8d44ac0.tar.bz2
samba-18d7a41acec8202b29c152f17bca3f7fe8d44ac0.zip
fixed another error found by valgrind
(This used to be commit 4368eaa523830f3101f0bb052346ed26bc70ae73)
Diffstat (limited to 'source4')
-rw-r--r--source4/libcli/ndr/libndr.h4
-rw-r--r--source4/libcli/ndr/ndr.c4
2 files changed, 3 insertions, 5 deletions
diff --git a/source4/libcli/ndr/libndr.h b/source4/libcli/ndr/libndr.h
index 931fc1c341..7bd92b4cd1 100644
--- a/source4/libcli/ndr/libndr.h
+++ b/source4/libcli/ndr/libndr.h
@@ -58,10 +58,6 @@ struct ndr_push_save {
uint32 offset;
};
-#define NDR_BASE_MARSHALL_SIZE 1024
-
-
-
#define LIBNDR_FLAG_BIGENDIAN 1
diff --git a/source4/libcli/ndr/ndr.c b/source4/libcli/ndr/ndr.c
index eca5799d8e..4e5f199835 100644
--- a/source4/libcli/ndr/ndr.c
+++ b/source4/libcli/ndr/ndr.c
@@ -29,6 +29,8 @@
#include "includes.h"
+#define NDR_BASE_MARSHALL_SIZE 1024
+
/*
initialise a ndr parse structure from a data blob
*/
@@ -166,7 +168,7 @@ NTSTATUS ndr_push_expand(struct ndr_push *ndr, uint32 size)
}
ndr->alloc_size = size;
- ndr->data = realloc(ndr->data, ndr->alloc_size);
+ ndr->data = talloc_realloc(ndr->mem_ctx, ndr->data, ndr->alloc_size);
if (!ndr->data) {
return NT_STATUS_NO_MEMORY;
}