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
Dupplicate the string we put into the returned dynar, so that user can free it withou...
[simgrid.git]
/
src
/
xbt
/
xbt_str.c
diff --git
a/src/xbt/xbt_str.c
b/src/xbt/xbt_str.c
index
edd062b
..
805adab
100644
(file)
--- a/
src/xbt/xbt_str.c
+++ b/
src/xbt/xbt_str.c
@@
-249,6
+249,7
@@
xbt_dynar_t xbt_str_split_str(const char *s, const char *sep) {
if (s[0] == '\0')
return res;
if (sep[0] == '\0') {
+ s = xbt_strdup(s);
xbt_dynar_push(res, &s);
return res;
}