diff options
| author | zhengchao <[email protected]> | 2019-06-08 20:55:43 +0800 |
|---|---|---|
| committer | zhengchao <[email protected]> | 2019-07-11 17:05:35 +0800 |
| commit | d9e1122d4f70f44db166453266d0fa3c18ccf4f7 (patch) | |
| tree | ff6bc7ae766c1b1d2d5021c3ec847d05125f77d7 /src/entry/Maat_command.cpp | |
| parent | 05f51e837268875818494ef2590ec923a6d4c3fd (diff) | |
修复Maat_cmd_key_free中的内存泄露
Diffstat (limited to 'src/entry/Maat_command.cpp')
| -rw-r--r-- | src/entry/Maat_command.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/entry/Maat_command.cpp b/src/entry/Maat_command.cpp index ee35b1f..28c8f3a 100644 --- a/src/entry/Maat_command.cpp +++ b/src/entry/Maat_command.cpp @@ -2452,13 +2452,13 @@ void Maat_cmd_key_free(struct Maat_cmd_key**keys, int size) {
int i=0;
struct Maat_cmd_key* p=*keys;
- for(i=0; i<size; i++)
+ for(i=0; i<size; i++, p++)
{
free(p->table_name);
p->table_name=NULL;
p->rule_id=0;
}
- free(p);
+ free(*keys);
*keys=NULL;
return;
}
|
