+void cleanupdbconfig(void *object)
+{
+ struct onak_db_config *dbconfig = (struct onak_db_config *) object;
+
+ if (dbconfig->name != NULL) {
+ free(dbconfig->name);
+ dbconfig->name = NULL;
+ }
+ if (dbconfig->type != NULL) {
+ free(dbconfig->type);
+ dbconfig->type = NULL;
+ }
+ if (dbconfig->location != NULL) {
+ free(dbconfig->location);
+ dbconfig->location = NULL;
+ }
+ if (dbconfig->hostname != NULL) {
+ free(dbconfig->hostname);
+ dbconfig->hostname = NULL;
+ }
+ if (dbconfig->username != NULL) {
+ free(dbconfig->username);
+ dbconfig->username = NULL;
+ }
+ if (dbconfig->password != NULL) {
+ free(dbconfig->password);
+ dbconfig->password = NULL;
+ }
+}
+