Skip to content

Commit c2cf984

Browse files
committed
refdb: check the version of the backend we're about to set
1 parent 8db9fd3 commit c2cf984

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/refdb.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ static void refdb_free_backend(git_refdb *db)
6666

6767
int git_refdb_set_backend(git_refdb *db, git_refdb_backend *backend)
6868
{
69+
GIT_ERROR_CHECK_VERSION(backend, GIT_REFDB_BACKEND_VERSION, "git_refdb_backend");
70+
6971
refdb_free_backend(db);
7072
db->backend = backend;
7173

0 commit comments

Comments
 (0)