aboutsummaryrefslogtreecommitdiff
path: root/src/cubeit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cubeit.c')
-rw-r--r--src/cubeit.c4
1 files changed, 2 insertions, 2 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;
}