aboutsummaryrefslogtreecommitdiffstats
path: root/libaxl_context_create.c
blob: 92ed94d94e7f37df1a714f9bec5b3434d0ca3f0f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* 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;
		ctx->aux_buf_size = 0;
		ctx->aux_buf      = NULL;
	}
	return ctx;
}