mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-13 17:20:55 +00:00
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:
parent
d616b5215b
commit
18b02464b4
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user