Open MPI logo

PLPA Users' Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all PLPA Users mailing list

Subject: [PLPA users] [PATCH] fix mem leak in load_cache.c
From: Bert Wesarg (bert.wesarg_at_[hidden])
Date: 2008-03-21 07:30:47


The cores_on_sockets isn't used anymore, so free it.

Bert

---
diff --quilt old/src/libplpa/plpa_map.c new/src/libplpa/plpa_map.c
--- old/src/libplpa/plpa_map.c
+++ new/src/libplpa/plpa_map.c
@@ -331,10 +331,11 @@ static void load_cache(const char *sysfs
         }
         if (count > 0) {
             num_cores[i] = count;
         }
     }
+    free(cores_on_sockets);
     /* Now go through and build the map in the other direction:
        (socket,core) => processor_id.  This map simply points to
        entries in the other map (i.e., it's by reference instead of by
        value). */