diff options
author | Carlos Martín Nieto <cmn@dwim.me> | 2014-04-21 16:38:52 +0200 |
---|---|---|
committer | Carlos Martín Nieto <cmn@dwim.me> | 2014-04-21 16:38:52 +0200 |
commit | 783993101949040865ea933eb73e35df806249b0 (patch) | |
tree | 3465a1ceda802380a39af5a8753248e3684700c2 /src | |
parent | a15d3537bb52450f75ad63642b6bcbbcc6fdc374 (diff) | |
download | libgit2-783993101949040865ea933eb73e35df806249b0.tar.gz |
attrcache: fix use-after-free
Reported by coverity.
Diffstat (limited to 'src')
-rw-r--r-- | src/attrcache.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/attrcache.c b/src/attrcache.c index 88b68ebb9..a750154ce 100644 --- a/src/attrcache.c +++ b/src/attrcache.c @@ -229,8 +229,8 @@ int git_attr_cache__get( if (error < 0) { /* remove existing entry */ if (file) { - git_attr_file__free(file); /* offset incref from lookup */ attr_cache_remove(cache, file); + git_attr_file__free(file); /* offset incref from lookup */ file = NULL; } /* no error if file simply doesn't exist */ |