mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +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/trunk@33488 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
6490dd8636
commit
4c92ec8383
@ -112,7 +112,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;
|
||||
@ -178,7 +178,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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user