summaryrefslogtreecommitdiffstats
path: root/models/git_diff.go
diff options
context:
space:
mode:
authorKim "BKC" Carlbäcker <kim.carlbacker@gmail.com>2017-12-12 01:32:36 +0100
committerLauris BH <lauris@nix.lv>2017-12-12 02:32:36 +0200
commit4b5197beb4b62baf93b4ae888557356d302f06e5 (patch)
tree7fc68a5725e8c4043d593346fc33c0e61f69c328 /models/git_diff.go
parent3b525d569662d6fbfd6a75be4c8df33f97af2e81 (diff)
downloadgitea-4b5197beb4b62baf93b4ae888557356d302f06e5.tar.gz
gitea-4b5197beb4b62baf93b4ae888557356d302f06e5.zip
Fix Uninitialized variable in ParsePatch (#3156)
Diffstat (limited to 'models/git_diff.go')
-rw-r--r--models/git_diff.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/models/git_diff.go b/models/git_diff.go
index 88285fa3e2..9e361d05f5 100644
--- a/models/git_diff.go
+++ b/models/git_diff.go
@@ -238,7 +238,7 @@ func ParsePatch(maxLines, maxLineCharacters, maxFiles int, reader io.Reader) (*D
var (
diff = &Diff{Files: make([]*DiffFile, 0)}
- curFile *DiffFile
+ curFile = &DiffFile{}
curSection = &DiffSection{
Lines: make([]*DiffLine, 0, 10),
}