aboutsummaryrefslogtreecommitdiffstats
path: root/libaxl_context_create.c
blob: da03ecf3cb77cb2977105535983e23c07580f0fa (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* See LICENSE file for copyright and license details. */
#include "common.h"

LIBAXL_CONTEXT *
libaxl_context_create(LIBAXL_CONNECTION *conn)
{
	LIBAXL_CONTEXT *ctx;
	ctx = liberror_malloc(sizeof(*ctx));
	if (ctx) {
		ctx->conn         = conn;
		ctx->refcount     = 1;
		ctx->out_buf_size = 0;
		ctx->out_buf      = NULL;
		ctx->in_buf_size  = 0;
		ctx->in_buf       = NULL;
	}
	return ctx;
}