mirror of
https://codeberg.org/scip/dbtool.git
synced 2025-12-16 19:00:58 +01:00
fix array allocation and deletion
This commit is contained in:
@@ -315,8 +315,7 @@ void Engine::regexp() {
|
|||||||
// record end
|
// record end
|
||||||
mode = "key";
|
mode = "key";
|
||||||
if(config.token != "") {
|
if(config.token != "") {
|
||||||
//char **subs = new char*[2];
|
string *subs = new string[2];
|
||||||
char *subs[2];
|
|
||||||
|
|
||||||
num = pcre2_match(p_pcre, (PCRE2_SPTR)line.c_str(), (PCRE2_SIZE)line.length(), 0, 0, match_data, NULL);
|
num = pcre2_match(p_pcre, (PCRE2_SPTR)line.c_str(), (PCRE2_SIZE)line.length(), 0, 0, match_data, NULL);
|
||||||
|
|
||||||
@@ -349,7 +348,7 @@ void Engine::regexp() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//delete(subs);
|
delete[] subs;
|
||||||
|
|
||||||
|
|
||||||
line = "";
|
line = "";
|
||||||
|
|||||||
Reference in New Issue
Block a user