[PATCH] usbredirtestclient: fix memory leak
Frediano Ziglio
freddy77 at gmail.com
Thu Nov 28 20:54:31 UTC 2024
On Thu, Nov 28, 2024 at 10:24 AM Anastasia Belova <abelova at astralinux.ru>
wrote:
> Just a friendly reminder.
>
>
Merged, thanks.
Sorry for the delay.
Frediano
> 12.11.2024 16:59, Anastasia Belova пишет:
> > free dynamic memory pointed by data before returning
> > from function.
> >
> > Found by Linux Verification Center (linuxtesting.org) with SVACE.
> >
> > Signed-off-by: Anastasia Belova <abelova at astralinux.ru>
> > ---
> > usbredirtestclient/usbredirtestclient.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/usbredirtestclient/usbredirtestclient.c
> b/usbredirtestclient/usbredirtestclient.c
> > index 62b72e8..6da87ec 100644
> > --- a/usbredirtestclient/usbredirtestclient.c
> > +++ b/usbredirtestclient/usbredirtestclient.c
> > @@ -409,6 +409,7 @@ static int usbredirtestclient_cmdline_ctrl(void)
> > }
> > if (!arg || *endptr != '\0') {
> > printf("Missing or invalid data byte(s)\n");
> > + free(data);
> > return 0;
> > }
> > }
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20241128/db48c85b/attachment.htm>
More information about the Spice-devel
mailing list