Re: [PATCH 1/1] Fix various memory leaks

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

 



Hi Steve,

On Wed, May 12, 2021 at 7:12 PM Steve Grubb <sgrubb@xxxxxxxxxx> wrote:
>
> On Wednesday, May 12, 2021 6:35:54 PM EDT Bastien Nocera wrote:
> > On Wed, 2021-05-12 at 13:39 -0400, Steve Grubb wrote:
> > > diff --git a/obexd/plugins/filesystem.c b/obexd/plugins/filesystem.c
> > > index 09bff8ad0..44e3cf3d2 100644
> > > --- a/obexd/plugins/filesystem.c
> > > +++ b/obexd/plugins/filesystem.c
> > > @@ -415,7 +415,7 @@ static void *capability_open(const char *name,
> > > int oflag, mode_t mode,
> > >                         goto fail;
> > >                 }
> > >
> > > -               object->buffer = g_string_new(buf);
> > > +               object->buffer = buf;
> > >
> > >                 if (size)
> > >                         *size = object->buffer->len;
> >
> > Pretty certain this is wrong.
>
> Yeah, now that you mention it...that is a GString object. I guess we
> g_free(buf) right after the g_string_new(). Should I resend just that one
> patch or do I need to regenerate all 7 emails?

Please resend as v7, also while at it remove the signed-off-by as we
don't use that in userspace.

-- 
Luiz Augusto von Dentz



[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux