[PATCH] Fix valgrind read-after-free error in cli_smb2_close_fnum_recv().

Volker Lendecke Volker.Lendecke at SerNet.DE
Thu Nov 30 07:13:08 UTC 2017

On Wed, Nov 29, 2017 at 10:13:00AM -0800, Jeremy Allison via samba-technical wrote:
> Yeah, I actually coded that up first and rejected it :-), because
> it still leaves the tevent_req_simple_recv_ntstatus(req)
> inside, which (silently) frees the data inside req.

Probably this is because I did not comment that sufficiently: Those
simple_recv_ functions are really meant as a short-cut if there is
nothing but this single call in the _recv function. If you have to do
anything but this call, do it manually. That was at least my intention
when I wrote this function. Sorry if this is not clear enough.


SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de

More information about the samba-technical mailing list