From: Arran Cudbard-Bell Date: Thu, 6 Nov 2014 03:46:44 +0000 (-0500) Subject: Parent vpt->name correctly X-Git-Tag: branch_3_1_x~4762 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d69093cdabd4454fdc40dd75c24ced271f69cf4e;p=thirdparty%2Ffreeradius-server.git Parent vpt->name correctly --- diff --git a/src/main/tmpl.c b/src/main/tmpl.c index bb0d52bfd87..5eb59f6af8b 100644 --- a/src/main/tmpl.c +++ b/src/main/tmpl.c @@ -699,8 +699,8 @@ value_pair_tmpl_t *tmpl_alloc(TALLOC_CTX *ctx, tmpl_type_t type, char const *nam if (!vpt) return NULL; vpt->type = type; if (name) { - vpt->name = len < 0 ? talloc_strdup(ctx, name) : - talloc_strndup(ctx, name, len); + vpt->name = len < 0 ? talloc_strdup(vpt, name) : + talloc_strndup(vpt, name, len); vpt->len = talloc_array_length(vpt->name) - 1; }