Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
sanitize the memory management
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 16 May 2006 08:56:11 +0000 (08:56 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Tue, 16 May 2006 08:56:11 +0000 (08:56 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@2214 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/xbt/xbt_host.c

index c668926..c2e8e56 100644 (file)
@@ -14,9 +14,9 @@
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(host,xbt,"Host management");
 
 /** \brief constructor */
-xbt_host_t xbt_host_new(char *name, int port)  {
+xbt_host_t xbt_host_new(const char *name, int port)  {
    xbt_host_t res=xbt_new(s_xbt_host_t, 1);
-   res->name = name;
+   res->name = xbt_strdup(name);
    res->port = port;
    return res;
 }