Commit dfda1cf5 by Jacques Germishuys

Check for OOM

parent 0beb7fe4
......@@ -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";
......
......@@ -115,6 +115,8 @@ static int ident_apply(
git_filter *git_ident_filter_new(void)
{
git_filter *f = git__calloc(1, sizeof(git_filter));
if (f == NULL)
return NULL;
f->version = GIT_FILTER_VERSION;
f->attributes = "+ident"; /* apply to files with ident attribute set */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment