diff --git a/res/res_sorcery_config.c b/res/res_sorcery_config.c
index deb2ffadd85fc44e56ccd690ea12daeda7177a73..b6ad0ccf5fe86e0e1d0da48675df25612dd7b59a 100644
--- a/res/res_sorcery_config.c
+++ b/res/res_sorcery_config.c
@@ -297,7 +297,7 @@ static void sorcery_config_internal_load(void *data, const struct ast_sorcery *s
 		/*  Confirm an object with this id does not already exist in the bucket.
 		 *  If it exists, however, the configuration is invalid so stop
 		 *  processing and destroy it. */
-		obj = ao2_find(objects, id, OBJ_KEY;
+		obj = ao2_find(objects, id, OBJ_KEY);
 
 		if (obj) {
 			ast_log(LOG_ERROR, "Config file '%s' could not be loaded; configuration contains a duplicate object: '%s' of type '%s'\n",