diff options
author | Petr Machata <pmachata@redhat.com> | 2012-10-29 15:32:42 +0100 |
---|---|---|
committer | Petr Machata <pmachata@redhat.com> | 2012-10-29 15:32:42 +0100 |
commit | c8691d002ca5347a4da6919b75d0a320acde0dce (patch) | |
tree | cfff1b1444ca34f46a9bc83dc462451c5f29c673 /read_config_file.c | |
parent | eb1286520c36957fa6bbf28a4146b68699f75948 (diff) | |
download | ltrace-c8691d002ca5347a4da6919b75d0a320acde0dce.tar.gz |
Release printf pack when it's been copied to function parameter list
This plugs a leak. Note that we don't want to call param_destroy on it,
as we still use the guts of the parameter. We just release the outer shell
memory block.
Diffstat (limited to 'read_config_file.c')
-rw-r--r-- | read_config_file.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/read_config_file.c b/read_config_file.c index 8391e10..b88b07b 100644 --- a/read_config_file.c +++ b/read_config_file.c @@ -1145,6 +1145,7 @@ process_line(char *buf) { assert(fun->num_params < allocd); memcpy(&fun->params[fun->num_params++], extra_param, sizeof(*extra_param)); + free(extra_param); } return fun; |