Commit d189baff authored by yiwenshao's avatar yiwenshao

remove memory leak in SWP

parent b354238c
......@@ -140,6 +140,7 @@ main(int argc,char**argv) {
Item* plain = getItemString(input);
auto res = tokenize(input);
control(sw, plain, num_of_tests, length*i,res->size());
delete res;
}
return 0;
}
......
......@@ -1479,7 +1479,7 @@ Search::encrypt(const Item &ptext, uint64_t IV) const
//TODO: remove string, string serves this purpose now..
const std::list<std::string> * const tokens = tokenize(plainstr);
const std::string ciph = encryptSWP(key, *tokens);
delete tokens;
LOG(encl) << "SEARCH encrypt " << plainstr << " --> " << ciph;
return new Item_string(newmem(ciph), ciph.length(), &my_charset_bin);
......
......@@ -593,8 +593,8 @@ void storeStrategies(std::vector<FieldMetaTrans>& res){
static const std::vector<onion> onion_order = {
oDET,
oASHE,
oDET,
oOPE,
oAGG,
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment