Skip to content

Commit 5b27dee

Browse files
committed
Do not access freed memory in test_push_options()
Fixes #1301
1 parent a9c7cce commit 5b27dee

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Diff for: test/test_remote.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -373,10 +373,9 @@ def test_push_options(mock_callbacks, origin, clone, remote):
373373
remote.push(['refs/heads/master'], push_options=['foo'])
374374
remote_push_options = mock_callbacks.return_value.push_options.remote_push_options
375375
assert remote_push_options.count == 1
376-
assert ffi.string(remote_push_options.strings[0]) == b'foo'
376+
# strings pointed to by remote_push_options.strings[] are already freed
377377

378378
remote.push(['refs/heads/master'], push_options=['Option A', 'Option B'])
379379
remote_push_options = mock_callbacks.return_value.push_options.remote_push_options
380380
assert remote_push_options.count == 2
381-
assert ffi.string(remote_push_options.strings[0]) == b'Option A'
382-
assert ffi.string(remote_push_options.strings[1]) == b'Option B'
381+
# strings pointed to by remote_push_options.strings[] are already freed

0 commit comments

Comments
 (0)