summaryrefslogtreecommitdiff
path: root/atari
diff options
context:
space:
mode:
Diffstat (limited to 'atari')
-rwxr-xr-xatari/findfile.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/atari/findfile.c b/atari/findfile.c
index 3a06f61e9..93bf4638e 100755
--- a/atari/findfile.c
+++ b/atari/findfile.c
@@ -41,7 +41,7 @@ char * local_file_to_url( const char * filename )
return( NULL );
}
- char * fname_local = alloca( strlen(filename)+1 );
+ char * fname_local = malloc( strlen(filename)+1 );
char * start = (char*)fname_local;
strcpy( start, filename );
@@ -72,6 +72,9 @@ char * local_file_to_url( const char * filename )
url = malloc( strlen(start) + FILE_SCHEME_PREFIX_LEN + 1);
strcpy( url, FILE_SCHEME_PREFIX );
strcat( url, start );
+
+ free(fname_local);
+
return( url );
#undef BACKSLASH
}