]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Parent vpt->name correctly
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 6 Nov 2014 03:46:44 +0000 (22:46 -0500)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 6 Nov 2014 03:46:44 +0000 (22:46 -0500)
src/main/tmpl.c

index bb0d52bfd874b9d12a6fa1e453fcd545870f3bf2..5eb59f6af8ba56c0fc70af291410cc74dc3f31e2 100644 (file)
@@ -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;
        }