Skip to content

Commit

Permalink
Merge pull request #37 from daniel-k/pr/fix_mr_use_after_free
Browse files Browse the repository at this point in the history
gdrdrv: fix use-after-free of variable mr in case of error
  • Loading branch information
drossetti authored Jul 6, 2018
2 parents 81c06d7 + 37a2e2f commit 8148051
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gdrdrv/gdrdrv.c
Original file line number Diff line number Diff line change
Expand Up @@ -418,8 +418,8 @@ static int gdrdrv_pin_buffer(gdr_info_t *info, void __user *_params)
}

if (ret && mr) {
kfree(mr);
memset(mr, 0, sizeof(*mr));
kfree(mr);
mr = NULL;
}

Expand Down

0 comments on commit 8148051

Please sign in to comment.