diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/cubeit.c | 4 | ||||
-rw-r--r-- | src/reintegrate.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/cubeit.c b/src/cubeit.c index d0c780c8..f6ff2c67 100644 --- a/src/cubeit.c +++ b/src/cubeit.c @@ -629,7 +629,7 @@ int main(int argc, char *argv[]) add_to_mean(cell, &as, &bs, &cs, &als, &bes, &gas); if ( config_basename ) { char *tmp; - tmp = basename(filename); + tmp = strdup(basename(filename)); free(filename); filename = tmp; } @@ -687,7 +687,7 @@ int main(int argc, char *argv[]) add_to_mean(cell, &as, &bs, &cs, &als, &bes, &gas); if ( config_basename ) { char *tmp; - tmp = basename(filename); + tmp = strdup(basename(filename)); free(filename); filename = tmp; } diff --git a/src/reintegrate.c b/src/reintegrate.c index 3a94c48f..af5f9e7a 100644 --- a/src/reintegrate.c +++ b/src/reintegrate.c @@ -254,7 +254,7 @@ static void integrate_all(int nthreads, struct detector *det, FILE *fh, if ( rval == 1 ) break; if ( config_basename ) { char *tmp; - tmp = basename(filename); + tmp = strdup(basename(filename)); free(filename); filename = tmp; } @@ -309,7 +309,7 @@ static void integrate_all(int nthreads, struct detector *det, FILE *fh, if ( rval == 1 ) break; if ( config_basename ) { char *tmp; - tmp = basename(filename); + tmp = strdup(basename(filename)); free(filename); filename = tmp; } |