Skip to content

Commit

Permalink
Merge pull request #254 from openziti/fix.double.free.send.individual
Browse files Browse the repository at this point in the history
on dupe info, don't use old pointers
  • Loading branch information
andrewpmartinez authored Mar 12, 2021
2 parents d6900c2 + 27d05df commit 1cf04b8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions library/posture.c
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,9 @@ static void ziti_pr_send_individually(ziti_context ztx) {
NEWP(new_info, pr_info);
memcpy(new_info, info, sizeof(pr_info));

new_info->id = strdup(info->id);
new_info->obj = strdup(info->obj);

NEWP(cb_ctx, pr_cb_ctx);
cb_ctx->info = new_info;
cb_ctx->ztx = ztx;
Expand Down

0 comments on commit 1cf04b8

Please sign in to comment.