Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Improve detection of remote exceptions, plus workaround a bug somewhere (backtrace...
[simgrid.git] / src / xbt / ex.c
index 9bd1bfc..4c4c6be 100644 (file)
@@ -87,11 +87,12 @@ void xbt_ex_free(xbt_ex_t e) {
 
   if (e.msg) free(e.msg);
   free(e.procname);
-  if (e.host) {
+  if (e.remote) {
     free(e.file);
     free(e.func);
-    for (i=0; i<e.used; i++) 
-      free(e.bt_strings[i]);
+    if (e.bt_strings) /* FIXME: should never be NULL... */
+      for (i=0; i<e.used; i++) 
+       free(e.bt_strings[i]);
     free(e.bt_strings);
     e.bt_strings=NULL;
     free(e.host);