Skip to content

Commit e6560af

Browse files
author
Vicent Martí
authored
Merge pull request #647 from tenderlove/fix-diff-leak
Fix memory leak in `Rugged::Tree.diff`
2 parents e3f2d95 + 020e24b commit e6560af

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

ext/rugged/rugged_tree.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -484,9 +484,8 @@ static VALUE rb_git_tree_diff_(int argc, VALUE *argv, VALUE self)
484484
int error;
485485

486486
rb_scan_args(argc, argv, "22", &rb_repo, &rb_self, &rb_other, &rb_options);
487-
rugged_parse_diff_options(&opts, rb_options);
488-
489487
Data_Get_Struct(rb_repo, git_repository, repo);
488+
rugged_parse_diff_options(&opts, rb_options);
490489

491490
if (!NIL_P(rb_self)) {
492491
if (!rb_obj_is_kind_of(rb_self, rb_cRuggedTree))

0 commit comments

Comments
 (0)