A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sanitize the memory management
[simgrid.git]
/
src
/
xbt
/
xbt_host.c
diff --git
a/src/xbt/xbt_host.c
b/src/xbt/xbt_host.c
index
c668926
..
c2e8e56
100644
(file)
--- a/
src/xbt/xbt_host.c
+++ b/
src/xbt/xbt_host.c
@@
-14,9
+14,9
@@
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(host,xbt,"Host management");
/** \brief constructor */
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(c
onst c
har *name, int port) {
xbt_host_t res=xbt_new(s_xbt_host_t, 1);
xbt_host_t res=xbt_new(s_xbt_host_t, 1);
- res->name =
name
;
+ res->name =
xbt_strdup(name)
;
res->port = port;
return res;
}
res->port = port;
return res;
}