On 14/08/2022 19:36, Geert Stappers via Dnsmasq-discuss wrote:
On Fri, Aug 12, 2022 at 06:46:14PM +0100, Simon Kelley wrote:
... Does your compiler still complain?
Nope
OK. Problem solved. Looks like gcc only generates false positives from
free(), not free() called by realloc().
On Fri, Aug 12, 2022 at 06:46:14PM +0100, Simon Kelley wrote:
> ... Does your compiler still complain?
>
Nope
___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
Interesting. I think this is a false positive, as the "use" is pointer
arithmetic to derive an integer offset, not a dereference. If you're
going to complain about using "buff" like that, you should equally
complain of using p, which just the value of buff that's just been freed
incremented a
Hello,
With GCC version 12.1 I do get:
cc -Wall -W -O2 -DVERSION='"2.87test8-16-g770bce9"' -c cache.c
cache.c: In function ‘cache_make_stat’:
cache.c:1683:30: warning: pointer used after ‘free’ [-Wuse-after-free]
1683 | p = new + (p - buff);
|