@@ -649,7 +649,7 @@ static VALUE rb_git_commit_to_mbox(int argc, VALUE *argv, VALUE self)
649
649
cleanup :
650
650
651
651
xfree (opts .pathspec .strings );
652
- git_buf_free (& email_patch );
652
+ git_buf_dispose (& email_patch );
653
653
rugged_exception_check (error );
654
654
655
655
return rb_email_patch ;
@@ -678,7 +678,7 @@ static VALUE rb_git_commit_header_field(VALUE self, VALUE rb_field)
678
678
error = git_commit_header_field (& header_field , commit , StringValueCStr (rb_field ));
679
679
680
680
if (error < 0 ) {
681
- git_buf_free (& header_field );
681
+ git_buf_dispose (& header_field );
682
682
if (error == GIT_ENOTFOUND )
683
683
return Qnil ;
684
684
rugged_exception_check (error );
@@ -689,7 +689,7 @@ static VALUE rb_git_commit_header_field(VALUE self, VALUE rb_field)
689
689
encoding = rb_enc_find (encoding_name );
690
690
691
691
rb_result = rb_enc_str_new (header_field .ptr , header_field .size , encoding );
692
- git_buf_free (& header_field );
692
+ git_buf_dispose (& header_field );
693
693
return rb_result ;
694
694
}
695
695
@@ -741,8 +741,8 @@ static VALUE rb_git_commit_extract_signature(int argc, VALUE *argv, VALUE self)
741
741
field = NIL_P (rb_field ) ? NULL : StringValueCStr (rb_field );
742
742
error = git_commit_extract_signature (& signature , & signed_data , repo , & commit_id , field );
743
743
if (error < 0 ) {
744
- git_buf_free (& signature );
745
- git_buf_free (& signed_data );
744
+ git_buf_dispose (& signature );
745
+ git_buf_dispose (& signed_data );
746
746
}
747
747
748
748
if (error == GIT_ENOTFOUND && giterr_last ()-> klass == GITERR_OBJECT ) {
@@ -754,8 +754,8 @@ static VALUE rb_git_commit_extract_signature(int argc, VALUE *argv, VALUE self)
754
754
rb_str_new (signed_data .ptr , signed_data .size ));
755
755
}
756
756
757
- git_buf_free (& signature );
758
- git_buf_free (& signed_data );
757
+ git_buf_dispose (& signature );
758
+ git_buf_dispose (& signed_data );
759
759
760
760
return ret ;
761
761
}
@@ -821,7 +821,7 @@ static VALUE rb_git_commit_create_to_s(VALUE self, VALUE rb_repo, VALUE rb_data)
821
821
rugged_exception_check (error );
822
822
823
823
ret = rb_str_new_utf8 (buf .ptr );
824
- git_buf_free (& buf );
824
+ git_buf_dispose (& buf );
825
825
826
826
return ret ;
827
827
}
0 commit comments