[PATCHv2] Fix a couple memory leaks

Jouni Malinen j
Fri Jun 8 10:38:05 PDT 2012

On Fri, Jun 08, 2012 at 10:31:00AM -0700, Paul Stewart wrote:
> On Fri, Jun 8, 2012 at 10:23 AM, Jouni Malinen <j at w1.fi> wrote:
> > this does not.. There is at least a theoretical possibility of
> > NLA_PUT_U32 using goto to skip that nlmsg_free(cqm) above.
> Wow!  That's an eye opener.  Will send a new patch.

Yeah.. Not really the part I like about libnl, but well, that's the
design it uses. I've been thinking of converting driver_nl80211.c to
use nla_put() directly, but have not really found enough justification
and time to do so. Then again, all the current uses of NLA_PUT* should
really be analyzed anyway since this types of issues show up every now
and then. I think I once went through the full file, but well, I still
don't trust on it being 100% correct.

Jouni Malinen                                            PGP id EFC895FA

More information about the Hostap mailing list