diff options
author | Etienne Samson <samson.etienne@gmail.com> | 2019-12-08 15:25:52 +0100 |
---|---|---|
committer | Etienne Samson <samson.etienne@gmail.com> | 2019-12-13 12:01:10 +0100 |
commit | 97b8491b01e99790a9f643a9571baf65fe168ba8 (patch) | |
tree | 20909fe04fa4eca5137c98fd06d80c026b94e896 /src/commit.c | |
parent | 39f78b0c03ccaffd5c4aae97897b616634cae3cf (diff) | |
download | libgit2-97b8491b01e99790a9f643a9571baf65fe168ba8.tar.gz |
refs: rename git_reference__set_name to git_reference__realloc
As git_reference__name will reallocate storage to account for longer
names (it's actually allocator-dependent), it will cause all existing
pointers to the old object to become dangling, as they now point to
freed memory.
Fix the issue by renaming to a more descriptive name, and pass a pointer
to the actual reference that can safely be invalidated if the realloc
succeeds.
Diffstat (limited to 'src/commit.c')
0 files changed, 0 insertions, 0 deletions