[PATCH ustream] ustream-openssl: fix bio memory leak
Daniel Golle
daniel at makrotopia.org
Wed Dec 9 11:57:40 EST 2020
On Wed, Dec 09, 2020 at 05:44:48PM +0100, Petr Štetiar wrote:
> Eneas U de Queiroz <cotequeiroz at gmail.com> [2020-12-09 13:06:45]:
>
> Hi,
>
> > Using the patch by Pan Chen as inspiration, this avoids a memory leak by
> > using a global BIO_METHOD pointer that doesn't ordinarily need to be
> > freed.
>
> this sounds weird, how is global pointer avoiding memory leaks? :-)
Well, it moves it from "definitely lost" to "still reachable" when
looking at it with valgrind. We will still have to free it as well,
and that could be done just like in the original patch.
>
> > CC: Pan Chen <serial115200 at outlook.com>
> >
> > Signed-off-by: Eneas U de Queiroz <cotequeiroz at gmail.com>
> >
> > ---
> > Run-tested with a WRT-3200ACM, running uclient_fetch and uhttpd.
> > I have not run it with valgrind or any other debugger.
>
> how do you otherwise verify the correctness? :-) FYI this is my work in progress[1].
>
> 1. https://gitlab.com/ynezz/openwrt-ustream-ssl/-/commit/807ce1de752e021802a563783dfa580950746a0c
>
> Cheers,
>
> Petr
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list