Re: [PATCH] usbredirtestclient: fix memory leak

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

 



Just a friendly reminder.

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@xxxxxxxxxxxxx>
---
  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;
              }
          }



[Index of Archives]     [Linux Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]