Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
model-checker : fclose forgotten in get_memory_map_addr
authorMarion Guthmuller <marion.guthmuller@loria.fr>
Thu, 24 May 2012 08:34:51 +0000 (10:34 +0200)
committerMarion Guthmuller <marion.guthmuller@loria.fr>
Thu, 24 May 2012 08:34:51 +0000 (10:34 +0200)
src/mc/mc_liveness.c

index 6f44c29..ed468f5 100644 (file)
@@ -45,8 +45,10 @@ const char* get_memory_map_addr(void *addr){
   if(fp == NULL)
     perror("fopen failed");
 
-  if(addr == NULL)
+  if(addr == NULL){
+    fclose(fp);
     return "nil";
+  }
 
   xbt_dynar_t lfields = NULL;
   xbt_dynar_t start_end  = NULL;