Skip to content

Commit

Permalink
Parent vpt->name correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
arr2036 committed Nov 6, 2014
1 parent 9407db9 commit d69093c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/tmpl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit d69093c

Please sign in to comment.