aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/vty/buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'openbsc/src/vty/buffer.c')
-rw-r--r--openbsc/src/vty/buffer.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/openbsc/src/vty/buffer.c b/openbsc/src/vty/buffer.c
index 195d06209..0bc1760cc 100644
--- a/openbsc/src/vty/buffer.c
+++ b/openbsc/src/vty/buffer.c
@@ -65,11 +65,11 @@ struct buffer_data {
#define BUFFER_DATA_FREE(D) talloc_free((D))
/* Make new buffer. */
-struct buffer *buffer_new(size_t size)
+struct buffer *buffer_new(void *ctx, size_t size)
{
struct buffer *b;
- b = talloc_zero(tall_vty_ctx, struct buffer);
+ b = talloc_zero(ctx, struct buffer);
if (size)
b->size = size;
@@ -138,7 +138,7 @@ static struct buffer_data *buffer_add(struct buffer *b)
{
struct buffer_data *d;
- d = _talloc_zero(tall_vty_ctx,
+ d = _talloc_zero(b,
offsetof(struct buffer_data, data[b->size]),
"buffer_add");
if (!d)