summaryrefslogtreecommitdiff
path: root/src/crlf.c
diff options
context:
space:
mode:
authorJacques Germishuys <jacquesg@striata.com>2014-12-27 21:04:28 +0200
committerJacques Germishuys <jacquesg@striata.com>2014-12-30 12:33:40 +0200
commitdfda1cf507f91b53e73345c9053f6a61587db984 (patch)
treeeb8810cb57010d8f7450d9e29b66c375621ce59e /src/crlf.c
parent0beb7fe42726671304161a1aecee4924617b7c96 (diff)
downloadlibgit2-dfda1cf507f91b53e73345c9053f6a61587db984.tar.gz
Check for OOM
Diffstat (limited to 'src/crlf.c')
-rw-r--r--src/crlf.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/crlf.c b/src/crlf.c
index 93448760d..c0a73990f 100644
--- a/src/crlf.c
+++ b/src/crlf.c
@@ -345,6 +345,8 @@ static void crlf_cleanup(
git_filter *git_crlf_filter_new(void)
{
struct crlf_filter *f = git__calloc(1, sizeof(struct crlf_filter));
+ if (f == NULL)
+ return NULL;
f->f.version = GIT_FILTER_VERSION;
f->f.attributes = "crlf eol text";