mirror of
https://git.proxmox.com/git/libgit2
synced 2025-06-22 19:19:41 +00:00
Check error code from git_cache_init
This commit is contained in:
parent
4edf3e099a
commit
7cadd1f6a7
@ -240,13 +240,13 @@ int git_odb_new(git_odb **out)
|
|||||||
if (!db)
|
if (!db)
|
||||||
return GIT_ENOMEM;
|
return GIT_ENOMEM;
|
||||||
|
|
||||||
git_cache_init(&db->cache, GIT_DEFAULT_CACHE_SIZE, &free_odb_object);
|
error = git_cache_init(&db->cache, GIT_DEFAULT_CACHE_SIZE, &free_odb_object);
|
||||||
if (error < GIT_SUCCESS)
|
if (error < GIT_SUCCESS)
|
||||||
return error;
|
return error;
|
||||||
|
|
||||||
if (git_vector_init(&db->backends, 4, backend_sort_cmp) < GIT_SUCCESS) {
|
if ((error = git_vector_init(&db->backends, 4, backend_sort_cmp)) < GIT_SUCCESS) {
|
||||||
free(db);
|
free(db);
|
||||||
return GIT_ENOMEM;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
*out = db;
|
*out = db;
|
||||||
|
Loading…
Reference in New Issue
Block a user