Skip to content

Commit

Permalink
Fix dangling pointer in format_email.
Browse files Browse the repository at this point in the history
  • Loading branch information
ehuss authored and joshtriplett committed Aug 19, 2020
1 parent f6e90a7 commit a56acdc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/diff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,8 @@ impl<'repo> Diff<'repo> {
message = &message[summary.len()..];
raw_opts.patch_no = patch_no;
raw_opts.total_patches = total_patches;
raw_opts.id = commit.id().raw();
let id = commit.id();
raw_opts.id = id.raw();
raw_opts.summary = summary.as_ptr() as *const _;
raw_opts.body = message.as_ptr() as *const _;
raw_opts.author = commit.author().raw();
Expand Down

0 comments on commit a56acdc

Please sign in to comment.