diff options
-rw-r--r-- | ChangeLog | 12 | ||||
-rw-r--r-- | plugin/icedteanp/IcedTeaNPPlugin.cc | 4 | ||||
-rw-r--r-- | plugin/icedteanp/IcedTeaPluginRequestProcessor.cc | 4 | ||||
-rw-r--r-- | plugin/icedteanp/IcedTeaPluginUtils.cc | 11 |
4 files changed, 21 insertions, 10 deletions
@@ -1,4 +1,14 @@ -2012-07-09 Adam Domurad <[email protected]> +2012-07-09 Martin Olsson <[email protected]> + + * plugin/icedteanp/IcedTeaPluginUtils.cc: Change calls from g_free + to free when allocated with calloc. + * plugin/icedteanp/IcedTeaPluginRequestProcessor.cc + (PluginRequestProcessor::call): Make sure args_array doesnt hold + garbage when freed. + (_loadURL): Change calls from g_free to free when allocated with + calloc. + +2012-07-09 Adam Domurad <[email protected]> Ignore invalid jar files in applets, like the oracle plugin does. * netx/net/sourceforge/jnlp/cache/IllegalResourceDescriptorException.java: diff --git a/plugin/icedteanp/IcedTeaNPPlugin.cc b/plugin/icedteanp/IcedTeaNPPlugin.cc index 810e383..eb6d4ec 100644 --- a/plugin/icedteanp/IcedTeaNPPlugin.cc +++ b/plugin/icedteanp/IcedTeaNPPlugin.cc @@ -1272,7 +1272,7 @@ void consume_message(gchar* message) { PLUGIN_DEBUG("Proxy info: %s\n", proxy_info); plugin_send_message_to_appletviewer(proxy_info); - g_free(decoded_url); + free(decoded_url); decoded_url = NULL; g_free(proxy_info); proxy_info = NULL; @@ -1298,7 +1298,7 @@ void consume_message(gchar* message) { PLUGIN_DEBUG("Cookie info: %s\n", cookie_info); plugin_send_message_to_appletviewer(cookie_info); - g_free(decoded_url); + free(decoded_url); decoded_url = NULL; g_free(cookie_info); cookie_info = NULL; diff --git a/plugin/icedteanp/IcedTeaPluginRequestProcessor.cc b/plugin/icedteanp/IcedTeaPluginRequestProcessor.cc index 6505333..ef23186 100644 --- a/plugin/icedteanp/IcedTeaPluginRequestProcessor.cc +++ b/plugin/icedteanp/IcedTeaPluginRequestProcessor.cc @@ -275,7 +275,7 @@ PluginRequestProcessor::call(std::vector<std::string*>* message_parts) JavaResultData* java_result; NPVariant* result_variant; std::string result_variant_jniid = std::string(); - NPVariant* args_array; + NPVariant* args_array = NULL; AsyncCallThreadData thread_data = AsyncCallThreadData(); reference = atoi(message_parts->at(3)->c_str()); @@ -994,7 +994,7 @@ _loadURL(void* data) { ((AsyncCallThreadData*) data)->result_ready = true; - g_free(decoded_url); + free(decoded_url); decoded_url = NULL; PLUGIN_DEBUG("_loadURL returning %d\n", ((AsyncCallThreadData*) data)->call_successful); diff --git a/plugin/icedteanp/IcedTeaPluginUtils.cc b/plugin/icedteanp/IcedTeaPluginUtils.cc index c57277c..c9fbc1a 100644 --- a/plugin/icedteanp/IcedTeaPluginUtils.cc +++ b/plugin/icedteanp/IcedTeaPluginUtils.cc @@ -297,7 +297,7 @@ IcedTeaPluginUtilities::strSplit(const char* str, const char* delim) v->reserve(strlen(str)/2); char* copy; - // Tokening is done on a copy + // Tokenization is done on a copy copy = (char*) malloc (sizeof(char)*strlen(str) + 1); strcpy(copy, str); @@ -308,11 +308,12 @@ IcedTeaPluginUtilities::strSplit(const char* str, const char* delim) { // Allocation on heap since caller has no way to knowing how much will // be needed. Make sure caller cleans up! - std::string* s = new std::string(); - s->append(tok_ptr); - v->push_back(s); - tok_ptr = strtok (NULL, " "); + std::string* s = new std::string(); + s->append(tok_ptr); + v->push_back(s); + tok_ptr = strtok (NULL, " "); } + free(copy); return v; } |