diff options
author | Thomas White <taw@bitwiz.org.uk> | 2010-12-07 18:11:18 -0700 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-02-22 15:27:08 +0100 |
commit | 5084f60ed55119d709cfd7f75fcc5823f58bc094 (patch) | |
tree | 5accca8352c77a852d6fec8b67fc6c3b810586e1 /src/cubeit.c | |
parent | c85230a897b62f223951f7cc5693c6175e2d673d (diff) |
Remove use of horribly ambiguous basename() function
Diffstat (limited to 'src/cubeit.c')
-rw-r--r-- | src/cubeit.c | 3 |
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; } |