C++ binding: Fixup memory leak in input module receive() calls
The Input::send() method allocated glib strings and copied input data, but only released the glib string container and leaked the actual string content. This led to leaks in the size of the verbatim input file, which is especially wasteful for uncompressed textual representations. This fixes bug #976.
This commit is contained in:
parent
2355d22919
commit
e3e1f20c7f
|
@ -1407,7 +1407,7 @@ void Input::send(void *data, size_t length)
|
|||
{
|
||||
auto gstr = g_string_new_len(static_cast<char *>(data), length);
|
||||
auto ret = sr_input_send(_structure, gstr);
|
||||
g_string_free(gstr, false);
|
||||
g_string_free(gstr, true);
|
||||
check(ret);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue