config: add asserts for non-null parameters in lock/unlock
diff --git a/src/config.c b/src/config.c
index 0837500..042805e 100644
--- a/src/config.c
+++ b/src/config.c
@@ -1182,6 +1182,8 @@ int git_config_lock(git_transaction **out, git_config *cfg)
git_config_backend *backend;
backend_internal *internal;
+ assert(cfg);
+
internal = git_vector_get(&cfg->backends, 0);
if (!internal || !internal->backend) {
giterr_set(GITERR_CONFIG, "cannot lock; the config has no backends");
@@ -1200,6 +1202,8 @@ int git_config_unlock(git_config *cfg, int commit)
git_config_backend *backend;
backend_internal *internal;
+ assert(cfg);
+
internal = git_vector_get(&cfg->backends, 0);
if (!internal || !internal->backend) {
giterr_set(GITERR_CONFIG, "cannot lock; the config has no backends");