Skip to content

Commit 7209a3e

Browse files
starseekercshorler
authored andcommitted
Use free on fileList[index]
1 parent 88e512c commit 7209a3e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/clutils/dirobj.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,8 +327,8 @@ void DirObj::InsertFile( const char * f, int index ) {
327327

328328
void DirObj::RemoveFile( int index ) {
329329
if( index < --fileCount ) {
330+
free(fileList[index]);
330331
const char ** spot = ( const char ** )&fileList[index];
331-
delete spot;
332332
memmove( spot, spot + 1, ( fileCount - index )*sizeof( char * ) );
333333
}
334334
}

0 commit comments

Comments
 (0)