Operator new[] should always be matched by operator delete[],

even when allocating POD types.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_6_X@33494 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Enrico Forestieri 2010-02-18 08:05:27 +00:00
parent d616b5215b
commit 18b02464b4
2 changed files with 4 additions and 2 deletions

View File

@ -111,7 +111,7 @@ string convert_path_list(string const & p, PathStyle const & target)
char * ptr = new char[size];
if (ptr && cygwin_conv_path_list(target, pc, ptr, size) == 0) {
string const path_list = subst(ptr, '\\', '/');
delete ptr;
delete [] ptr;
return path_list;
} else
lyxerr << "LyX: Cannot convert path list: " << p << endl;
@ -177,7 +177,7 @@ string convert_path_list(string const & p, PathStyle const & target)
cygwin_posix_to_win32_path_list(pc, ptr);
string path_list = subst(ptr, '\\', '/');
delete ptr;
delete [] ptr;
return path_list;
}
}

View File

@ -225,3 +225,5 @@ What's new
* BUILD/INSTALLATION
- Fix compiler warnings about comparisons with string literals.
- Fix code in some places such that to avoid possible runtime problems.