[PATCH 00/15] Add attributes to allocation functions
Stephen Hemminger
stephen at networkplumber.org
Mon Jan 20 19:42:54 CET 2025
On Mon, 20 Jan 2025 18:40:53 +0000
Bruce Richardson <bruce.richardson at intel.com> wrote:
> On Mon, Jan 20, 2025 at 10:03:18AM -0800, Stephen Hemminger wrote:
> > This patch series builds on the allocation function attributes
> > added in 24.11 release. These annotations will allow for compiler
> > to flag cases where a pointer is allocated with one function
> > but incorrectly passed to a different free function.
> >
> > Checkpatch perl script falsely complains in a couple patches
> > because it doesn't really understand C syntax for attributes.
> >
>
> Looking at the patchset, I see a number of functions moved in files. Is
> there a restriction on the placement of the alloc and free functions where
> free has to be defined first?
>
> /Bruce
Yes the function prototype must be defined before it can be used.
More information about the dev
mailing list