diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/lib/packet.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source3/lib/packet.c b/source3/lib/packet.c index d63ca2ef27..a3a33643ff 100644 --- a/source3/lib/packet.c +++ b/source3/lib/packet.c @@ -136,15 +136,16 @@ BOOL packet_handler(struct packet_context *ctx, SMB_ASSERT(length <= ctx->in.length); - data.data = ctx->in.data; - data.length = length; - - *status = callback(&data, private_data); + data = data_blob(ctx->in.data, length); memmove(ctx->in.data, ctx->in.data + length, ctx->in.length - length); ctx->in.length -= length; + *status = callback(&data, private_data); + + data_blob_free(&data); + return True; } |