diff options
author | Russell Belfer <rb@github.com> | 2013-09-11 23:45:37 +0400 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2013-09-17 20:31:45 +0400 |
commit | 0646634e2fea3e0adf724e0b7b15118574b589fc (patch) | |
tree | 6c3f480fc2a311dee6127b5af0dd32ff2c600677 /src/crlf.c | |
parent | a3aa5f4d5dcbe038f1d1c5ff40eed29d27953fbe (diff) |
Update filter registry code
This updates the git filter registry to be a little cleaner and
plugs some memory leaks.
Diffstat (limited to 'src/crlf.c')
-rw-r--r-- | src/crlf.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/crlf.c b/src/crlf.c index cc256fc70..e974208a6 100644 --- a/src/crlf.c +++ b/src/crlf.c @@ -318,6 +318,11 @@ static void crlf_cleanup( git__free(payload); } +static void crlf_shutdown(git_filter *self) +{ + git__free(self); +} + git_filter *git_crlf_filter_new(void) { struct crlf_filter *f = git__calloc(1, sizeof(struct crlf_filter)); @@ -325,10 +330,10 @@ git_filter *git_crlf_filter_new(void) f->f.version = GIT_FILTER_VERSION; f->f.attributes = "crlf eol text"; f->f.initialize = NULL; - f->f.shutdown = NULL; - f->f.check = crlf_check; - f->f.apply = crlf_apply; - f->f.cleanup = crlf_cleanup; + f->f.shutdown = crlf_shutdown; + f->f.check = crlf_check; + f->f.apply = crlf_apply; + f->f.cleanup = crlf_cleanup; return (git_filter *)f; } |