From 7cb77df97bc951af364e4bcedf694cd06460c20e Mon Sep 17 00:00:00 2001 From: "rponczkowski@advaoptical.com" Date: Mon, 21 Nov 2016 11:35:11 +0100 Subject: [PATCH] do not break datastores initialization loop in case of disabled startup datastore capability when startup datastore capability is disabled some modules will not have called transapi_init functions because loop will not go through all datastores --- src/datastore.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/datastore.c b/src/datastore.c index ba1e775f..ca18e649 100644 --- a/src/datastore.c +++ b/src/datastore.c @@ -1005,7 +1005,7 @@ API int ncds_device_init(ncds_id *id, struct nc_cpblts *cpblts, int force) * reboots */ if (!nc_cpblts_enabled(dummy_session, NC_CAP_STARTUP_ID)) { - goto cleanup; + goto cleanup_inloop; } /* replace running datastore with current configuration provided by module, or erase it if none provided @@ -1029,6 +1029,7 @@ API int ncds_device_init(ncds_id *id, struct nc_cpblts *cpblts, int force) } nc_reply_free(reply_msg); +cleanup_inloop: /* prepare variable for the next loop */ free(new_running_config); new_running_config = NULL;