1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-25 17:17:31 +00:00

fix memory error reported by John_Clay

This commit is contained in:
Charles Kerr 2007-11-02 20:27:03 +00:00
parent 930199dbeb
commit 7ce8312ddc

View file

@ -133,9 +133,9 @@ TrOpenFile( int i, const char * filename, int write )
/* create subfolders, if any */
if( write ) {
char * dir = dirname( tr_strdup( filename ) );
const int val = tr_mkdirp( dir, 0700 );
tr_free( dir );
char * tmp = tr_strdup( filename );
const int val = tr_mkdirp( dirname(tmp), 0700 );
tr_free( tmp );
if( val )
return tr_ioErrorFromErrno( );
}