Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
[PATCH] document command to show diff of a commit
[gitweb.git]
/
diff.c
diff --git
a/diff.c
b/diff.c
index 05a0663d4dc0a90a35535f00527a4dae38326526..d8d20c2fcb141124bf4c798eb054e5c1be451f68 100644
(file)
--- a/
diff.c
+++ b/
diff.c
@@
-762,7
+762,8
@@
struct diff_filepair *diff_queue(struct diff_queue_struct *queue,
dp->status = 0;
dp->source_stays = 0;
dp->broken_pair = 0;
- diff_q(queue, dp);
+ if (queue)
+ diff_q(queue, dp);
return dp;
}
@@
-770,6
+771,8
@@
void diff_free_filepair(struct diff_filepair *p)
{
diff_free_filespec_data(p->one);
diff_free_filespec_data(p->two);
+ free(p->one);
+ free(p->two);
free(p);
}