You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm seeing a use-after-free bug when accessing a Patch object after its Diff had been garbage-collected. Valgrind confirms.
The quick fix is to strdup()old_file.path and new_file.path (and free in Patch_dealloc). Better would be to skip the mallocs and piggyback the git_patch* onto the Patch object and move git_patch_free() to Patch_dealloc. Thoughts?
The text was updated successfully, but these errors were encountered:
I'm seeing a use-after-free bug when accessing a Patch object after its Diff had been garbage-collected. Valgrind confirms.
The quick fix is to
strdup()
old_file.path
andnew_file.path
(andfree
inPatch_dealloc
). Better would be to skip the mallocs and piggyback thegit_patch*
onto thePatch
object and movegit_patch_free()
toPatch_dealloc
. Thoughts?The text was updated successfully, but these errors were encountered: