Re: pppoe: add sizes to free() calls

2020-08-20 Thread Vitaliy Makkoveev
ok mvs@ > On 20 Aug 2020, at 17:12, Klemens Nanni wrote: > > On Thu, Aug 20, 2020 at 03:33:17PM +0200, Klemens Nanni wrote: >> These are straight forward as we either maintain a size variable all the >> way or can reuse strlen() for free() just like it's done during malloc(). >> >> One

Re: pppoe: add sizes to free() calls

2020-08-20 Thread Vitaliy Makkoveev
> On 20 Aug 2020, at 16:33, Klemens Nanni wrote: > > These are straight forward as we either maintain a size variable all the > way or can reuse strlen() for free() just like it's done during malloc(). > > One exception is freeing the softc structure, which is fixed in size; > `ifconfig pppoe1

Re: pppoe: add sizes to free() calls

2020-08-20 Thread Klemens Nanni
On Thu, Aug 20, 2020 at 03:33:17PM +0200, Klemens Nanni wrote: > These are straight forward as we either maintain a size variable all the > way or can reuse strlen() for free() just like it's done during malloc(). > > One exception is freeing the softc structure, which is fixed in size; >

pppoe: add sizes to free() calls

2020-08-20 Thread Klemens Nanni
These are straight forward as we either maintain a size variable all the way or can reuse strlen() for free() just like it's done during malloc(). One exception is freeing the softc structure, which is fixed in size; `ifconfig pppoe1 create; ifconfig pppoe1 destroy' exercises this code path and