File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -77,8 +77,8 @@ wrap_patch(git_patch *patch)
77
77
78
78
delta = git_patch_get_delta (patch );
79
79
80
- py_patch -> old_file_path = delta -> old_file .path ;
81
- py_patch -> new_file_path = delta -> new_file .path ;
80
+ py_patch -> old_file_path = strdup ( delta -> old_file .path ) ;
81
+ py_patch -> new_file_path = strdup ( delta -> new_file .path ) ;
82
82
py_patch -> status = git_diff_status_char (delta -> status );
83
83
py_patch -> similarity = delta -> similarity ;
84
84
py_patch -> flags = delta -> flags ;
@@ -153,8 +153,8 @@ Patch_dealloc(Patch *self)
153
153
Py_CLEAR (self -> hunks );
154
154
Py_CLEAR (self -> old_id );
155
155
Py_CLEAR (self -> new_id );
156
- /* We do not have to free old_file_path and new_file_path, they will
157
- * be freed by git_diff_list_free in Diff_dealloc */
156
+ free ( self -> old_file_path );
157
+ free ( self -> new_file_path );
158
158
PyObject_Del (self );
159
159
}
160
160
You can’t perform that action at this time.
0 commit comments