RE: [PATCH 07/18] P2P: Fix possible memory leak in p2p_group_delete

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: Jouni Malinen [mailto:j@xxxxx]
> Sent: Saturday, September 10, 2016 21:45
> To: Otcheretianski, Andrei <andrei.otcheretianski@xxxxxxxxx>
> Cc: hostap@xxxxxxxxxxxxxxxxxxx; Peer, Ilan <ilan.peer@xxxxxxxxx>
> Subject: Re: [PATCH 07/18] P2P: Fix possible memory leak in
> p2p_group_delete
> 
> On Mon, Sep 05, 2016 at 05:33:00PM +0300, andrei.otcheretianski@xxxxxxxxx
> wrote:
> > In wpas_p2p_group_delete() free the pointer earlier, as the function
> > might return early.
> 
> > diff --git a/wpa_supplicant/p2p_supplicant.c
> > b/wpa_supplicant/p2p_supplicant.c @@ -929,6 +929,10 @@ static int
> > wpas_p2p_group_delete(struct wpa_supplicant *wpa_s,
> > +	os_free(wpa_s->p2p_group_common_freqs);
> > +	wpa_s->p2p_group_common_freqs = NULL;
> > +	wpa_s->p2p_group_common_freqs_num = 0;
> 
> Hmm.. How exactly would this be fixing a memory leak when wpa_s-
> >p2p_group_common_freqs is freed in wpas_p2p_deinit() which would be
> called if the group interface got removed before reached the later point
> down here:
> 

Agree. Please drop this patch. 

Thanks,

Ilan.

_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux