summaryrefslogtreecommitdiff
path: root/source3/rpc_parse
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-01-24 02:07:40 +0100
committerGünther Deschner <gd@samba.org>2009-01-24 03:00:37 +0100
commitcf41042a3c4ccf613e312570d8d93932b54dcaee (patch)
treef5dc5d6c2a938bcd9f0c38766fcb5e5c42541b08 /source3/rpc_parse
parentd629ba480b7cd7344d842069f18fd07f088c4f2f (diff)
downloadsamba-cf41042a3c4ccf613e312570d8d93932b54dcaee.tar.gz
samba-cf41042a3c4ccf613e312570d8d93932b54dcaee.tar.bz2
samba-cf41042a3c4ccf613e312570d8d93932b54dcaee.zip
s3-eventlog: fix buffer allocation in eventlog read call.
This broke with f6fa3080fee1b20df9f1968500840a88cf0ee592 back in April 2007... Guenther
Diffstat (limited to 'source3/rpc_parse')
-rw-r--r--source3/rpc_parse/parse_eventlog.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/source3/rpc_parse/parse_eventlog.c b/source3/rpc_parse/parse_eventlog.c
index a55993cc2e..40930a2500 100644
--- a/source3/rpc_parse/parse_eventlog.c
+++ b/source3/rpc_parse/parse_eventlog.c
@@ -185,6 +185,7 @@ bool eventlog_io_r_read_eventlog(const char *desc,
/* Now pad with whitespace until the end of the response buffer */
if (q_u->max_read_size - r_u->num_bytes_in_resp) {
+ r_u->end_of_entries_padding = PRS_ALLOC_MEM(ps, uint8_t, q_u->max_read_size - r_u->num_bytes_in_resp);
if (!r_u->end_of_entries_padding) {
return False;
}
@@ -192,11 +193,8 @@ bool eventlog_io_r_read_eventlog(const char *desc,
if(!(prs_uint8s(False, "end of entries padding", ps,
depth, r_u->end_of_entries_padding,
(q_u->max_read_size - r_u->num_bytes_in_resp)))) {
- free(r_u->end_of_entries_padding);
return False;
}
-
- free(r_u->end_of_entries_padding);
}
/* We had better be DWORD aligned here */