Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
double free fixes
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Wed, 17 Feb 2016 14:44:01 +0000 (15:44 +0100)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Wed, 17 Feb 2016 14:44:01 +0000 (15:44 +0100)
  it helps to finally test functions ...
  coverage of java bindings has to be improved

src/bindings/java/jmsg_host.cpp
src/bindings/java/jmsg_storage.cpp

index 1d6e240..dba26b2 100644 (file)
@@ -238,7 +238,7 @@ Java_org_simgrid_msg_Host_setProperty(JNIEnv *env, jobject jhost, jobject jname,
 
   MSG_host_set_property_value(host, name, value, xbt_free_f);
 
 
   MSG_host_set_property_value(host, name, value, xbt_free_f);
 
-  env->ReleaseStringUTFChars((jstring) jvalue, value);
+  env->ReleaseStringUTFChars((jstring) jvalue, value_java);
   env->ReleaseStringUTFChars((jstring) jname, name);
 
 }
   env->ReleaseStringUTFChars((jstring) jname, name);
 
 }
index cc3b39b..1af9c1e 100644 (file)
@@ -182,7 +182,7 @@ Java_org_simgrid_msg_Storage_setProperty(JNIEnv *env, jobject jstorage, jobject
 
   MSG_storage_set_property_value(storage, name, value, xbt_free_f);
 
 
   MSG_storage_set_property_value(storage, name, value, xbt_free_f);
 
-  env->ReleaseStringUTFChars((jstring) jvalue, value);
+  env->ReleaseStringUTFChars((jstring) jvalue, value_java);
   env->ReleaseStringUTFChars((jstring) jname, name);
 
 }
   env->ReleaseStringUTFChars((jstring) jname, name);
 
 }