[RFC PATCH v3 3/5] Add eventfd option to --decode-fds

Sahil icegambit91 at gmail.com
Mon May 13 19:06:28 UTC 2024


Hi,

On Monday, May 13, 2024 5:34:19 PM GMT+5:30 Dmitry V. Levin wrote:
> On Fri, May 10, 2024 at 10:44:09AM +0530, Sahil Siddiq wrote:
> > [...]
> > +
> > +          if (*ptr == '\0')
> > +                    ptr = NULL;
> > +
> > +          *(char **)data = ptr;
> 
> Sorry, you cannot do this because ptr points to a memory that is allocated
> by getline(), and it will be freed no later than at the end of
> scan_fdinfo().

Oh yes, I didn't notice this. I guess I'll have to duplicate the string here.
I'll fix this.

Thanks,
Sahil




More information about the Strace-devel mailing list