summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevron Rees <kevron_m_rees@linux.intel.com>2013-08-13 15:56:17 -0700
committerKevron Rees <kevron_m_rees@linux.intel.com>2013-08-13 16:00:55 -0700
commit9bc432599f5576786983315980db5d5ced48e389 (patch)
tree8a6aa2fe9aa9f593b85f09455d05665c29fb050b
parent6240721fa7a4012aca8b62e836f3a6afeccae06f (diff)
downloadautomotive-message-broker-9bc432599f5576786983315980db5d5ced48e389.tar.gz
may have fixed memory smashing
-rw-r--r--ambd/pluginloader.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/ambd/pluginloader.cpp b/ambd/pluginloader.cpp
index 83c56e00..6d81e1c1 100644
--- a/ambd/pluginloader.cpp
+++ b/ambd/pluginloader.cpp
@@ -182,8 +182,7 @@ PluginLoader::PluginLoader(string configFile, AbstractRoutingEngine* re, int arg
}
- json_object *pathobject = json_object_object_get(obj,"path");
- string path = string(json_object_get_string(pathobject));
+ string path = configurationMap["path"];
AbstractSinkManager* plugin = loadPlugin<AbstractSinkManager*>(path, configurationMap);
@@ -191,14 +190,10 @@ PluginLoader::PluginLoader(string configFile, AbstractRoutingEngine* re, int arg
{
throw std::runtime_error("plugin is not a SinkManager");
}
- json_object_put(pathobject);
- //json_object_put(obj);
-
}
- DebugOut() << "Trying to free list" << endl;
- array_list_free(sinkslist);
+
DebugOut() << "Trying to free obj" << endl;
- //json_object_put(sinksobject);
+ json_object_put(sinksobject);
DebugOut() << "Done" << endl;