Nicolas Pitre <nico <at> fluxnic.net> writes:
> diff --git a/remote.c b/remote.c
quoted
index 4f9f0cc..6195a58 100644
--- a/remote.c
+++ b/remote.c
@@ -754,6 +754,8 @@ void ref_remove_duplicates(struct ref *ref_map)
prev->next = ref_map->next;
free(ref_map->peer_ref);
free(ref_map);
+ ref_map = prev; // Keep the same prev.
+ continue;
}
This is one of those example where the comment is essentially useless.
Wouldn't something like "// Skip the freed item" be more useful?
- Eric