1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

r16872: when we know the data length we can preallocate the buffer

and avoid a realloc

metze
This commit is contained in:
Stefan Metzmacher 2006-07-08 08:20:10 +00:00 committed by Gerald (Jerry) Carter
parent 283bec8295
commit 51d59d23a1

View File

@ -54,7 +54,7 @@ static void smb2srv_getinfo_send(struct ntvfs_request *ntvfs)
SMB2SRV_CHECK(op->send_fn(op)); SMB2SRV_CHECK(op->send_fn(op));
} }
SMB2SRV_CHECK(smb2srv_setup_reply(req, 0x08, True, 0)); SMB2SRV_CHECK(smb2srv_setup_reply(req, 0x08, True, op->info->out.blob.length));
/* TODO: this is maybe a o16s32_blob */ /* TODO: this is maybe a o16s32_blob */
SMB2SRV_CHECK(smb2_push_o16s16_blob(&req->out, 0x02, op->info->out.blob)); SMB2SRV_CHECK(smb2_push_o16s16_blob(&req->out, 0x02, op->info->out.blob));