summaryrefslogtreecommitdiff
path: root/src/config.c
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@elego.de>2011-05-17 13:38:19 +0200
committerCarlos Martín Nieto <cmn@elego.de>2011-05-17 13:41:42 +0200
commit29dca0883faaaa9831c9d4fd3baf6f9afcc2d2e8 (patch)
tree25608b40e8291ff5a1c4762da76ce4b20ea08b45 /src/config.c
parent94711cad3b83445dfcf45a6e0b29b045e06a29f6 (diff)
downloadlibgit2-29dca0883faaaa9831c9d4fd3baf6f9afcc2d2e8.tar.gz
Move config to the new error methods
Take this opportunity to fix an instance of returning GIT_EOBJCORRUPTED when malloc failed. Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Diffstat (limited to 'src/config.c')
-rw-r--r--src/config.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/config.c b/src/config.c
index d839e3892..234c5303f 100644
--- a/src/config.c
+++ b/src/config.c
@@ -65,7 +65,9 @@ int git_config_open_bare(git_config **out, const char *path)
if (error < GIT_SUCCESS)
goto error;
- git_config_add_backend(cfg, backend, 1);
+ error = git_config_add_backend(cfg, backend, 1);
+ if (error < GIT_SUCCESS)
+ goto error;
error = backend->open(backend);
if (error < GIT_SUCCESS)