diff options
author | David Sommerseth <dazo@users.sourceforge.net> | 2010-12-05 23:48:31 +0100 |
---|---|---|
committer | David Sommerseth <dazo@users.sourceforge.net> | 2010-12-05 23:50:35 +0100 |
commit | 5d3865f83985e5d827e2b294841daa0219c2388a (patch) | |
tree | eac896f30e51179a29196acef697ec1c80dd7eb4 | |
parent | 5542fc4a86206d4676407390fd6e8310392ac092 (diff) | |
download | eurephia-5d3865f83985e5d827e2b294841daa0219c2388a.tar.gz eurephia-5d3865f83985e5d827e2b294841daa0219c2388a.tar.xz eurephia-5d3865f83985e5d827e2b294841daa0219c2388a.zip |
Fixed a memory leak in eurephia_learn_address(...)
The char buffer returned by eDBget_firewall_profile() must be freed after
usage.
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
-rw-r--r-- | plugin/eurephia.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/plugin/eurephia.c b/plugin/eurephia.c index 3451e8c..fad7117 100644 --- a/plugin/eurephia.c +++ b/plugin/eurephia.c @@ -687,6 +687,7 @@ int eurephia_learn_address(eurephiaCTX *ctx, const char *mode, const char *clien strncpy(req.rule_destination, fwdest, sizeof(req.rule_destination)); strncpy(req.goto_destination, fwprofile, sizeof(req.goto_destination)); eFW_UpdateFirewall(ctx, &req); + free_nullsafe(ctx, fwprofile); } } eDBfree_session(ctx, session); @@ -715,6 +716,7 @@ int eurephia_learn_address(eurephiaCTX *ctx, const char *mode, const char *clien strncpy(req.rule_destination, fwdest, sizeof(req.rule_destination)); strncpy(req.goto_destination, fwprofile, sizeof(req.goto_destination)); eFW_UpdateFirewall(ctx, &req); + free_nullsafe(ctx, fwprofile); } } ret = eDBdestroy_session(ctx, session); |