|
From: | Paul Eggert |
Subject: | bug#47384: [PATCH 1/2] hostname: fix a memory leak with -Dlint |
Date: | Thu, 25 Mar 2021 08:56:15 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 |
On 3/25/21 3:57 AM, Kamil Dudka wrote:
+#ifdef lint + free(hostname); +#endif
Let's not do this one. The program is about to exit so there's no need to free, and any static-checking tool that complains about a missing 'free' here is issuing a false alarm. On this particular issue it's better to fix the tools than to clutter upb source code to pacify them.
[Prev in Thread] | Current Thread | [Next in Thread] |