[Users] [Bug 4455] New: Potential memory leak in string_table_new()

noreply at thewildbeast.co.uk noreply at thewildbeast.co.uk
Fri Mar 5 08:49:01 CET 2021


https://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=4455

            Bug ID: 4455
           Summary: Potential memory leak in string_table_new()
           Product: Claws Mail
           Version: GIT
          Hardware: PC
                OS: Windows 10
            Status: NEW
          Severity: normal
          Priority: P3
         Component: Other
          Assignee: users at lists.claws-mail.org
          Reporter: rootkea at gmail.com

Hello!

In src/common/strimngtable.c string_table_new() at Line no. 67 there is a
potential memory leak.

If `strtable->hash_table` is `NULL` and so
`cm_return_val_if_fail(strtable->hash_table, NULL)` macro expands to return
NULL exiting the string_table_new() then the memory pointed by `strtable`
(allocate via g_new0 L64) remains to be freed and hence leaked.

Found by scan-build https://clang-analyzer.llvm.org/scan-build.html

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Users mailing list