aboutsummaryrefslogtreecommitdiff
path: root/src/cubeit.c
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2010-12-07 18:11:18 -0700
committerThomas White <taw@physics.org>2012-02-22 15:27:08 +0100
commit5084f60ed55119d709cfd7f75fcc5823f58bc094 (patch)
tree5accca8352c77a852d6fec8b67fc6c3b810586e1 /src/cubeit.c
parentc85230a897b62f223951f7cc5693c6175e2d673d (diff)
Remove use of horribly ambiguous basename() function
Diffstat (limited to 'src/cubeit.c')
-rw-r--r--src/cubeit.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cubeit.c b/src/cubeit.c
index c5766d6f..808e2e23 100644
--- a/src/cubeit.c
+++ b/src/cubeit.c
@@ -403,7 +403,7 @@ static void *get_image(void *qp)
if ( qargs->config_basename ) {
char *tmp;
- tmp = strdup(basename(filename));
+ tmp = safe_basename(filename);
free(filename);
filename = tmp;
}
@@ -414,6 +414,7 @@ static void *get_image(void *qp)
pargs->cell = cell;
pargs->filename = malloc(1024);
snprintf(pargs->filename, 1023, "%s%s", qargs->prefix, filename);
+ free(filename);
return pargs;
}