Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-05-28 02:50:30 +0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-29 22:17:43 +0400
commit226406f693013ea3eadab258cb5fc9d8e83df916 (patch)
treec08246838de338afaad76cf758d5099395bae36d /diffcore-rename.c
parenta00d7d106aa333c4b4d0095f58e05c0c4621bbc2 (diff)
[PATCH] Introduce diff_free_filepair() funcion.
This introduces a new function to free a common data structure, and plugs some leaks. Signed-off-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'diffcore-rename.c')
-rw-r--r--diffcore-rename.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/diffcore-rename.c b/diffcore-rename.c
index 81e4d9df3d..39a53a88ba 100644
--- a/diffcore-rename.c
+++ b/diffcore-rename.c
@@ -361,11 +361,8 @@ void diffcore_rename(int detect_rename, int minimum_score)
else
pair_to_free = p;
}
- if (pair_to_free) {
- diff_free_filespec_data(pair_to_free->one);
- diff_free_filespec_data(pair_to_free->two);
- free(pair_to_free);
- }
+ if (pair_to_free)
+ diff_free_filepair(pair_to_free);
}
diff_debug_queue("done copying original", &outq);