[splint-discuss] problem with function inet_ntoa()
Ludolf Holzheid
lholzheid at bihl-wiedemann.de
Mon Mar 31 06:03:31 PST 2008
On Mon, 2008-03-31 19:06:45 +0530, Vishal Bayskar wrote:
> [..]
>
> Following line is used in the code
>
> strcpy (ip_addr, inet_ntoa (((struct sockaddr_in *)
> &ifr.ifr_addr)->sin_addr));
>
> [..]
> When I run the splint, it is giving the following warning is displaying
>
>
> New fresh storage (type char *) passed as implicitly temp
>
> (not released): inet_ntoa(((struct sockaddr_in
> *)&ifr.ifr_ifru.ifru_addr)->s
>
> in_addr)
>
> A memory leak has been detected. Storage allocated locally is not
> released
>
> before the last reference to it is lost. (Use -mustfreefresh to
> inhibit
It seems splint does not know the return value of inet_ntoa() is
/*@kept@*/. Are you sure you selected the UNIX library (by specifying
the +unixlib flag)?
Ludolf
--
---------------------------------------------------------------
Ludolf Holzheid Tel: +49 621 339960
Bihl+Wiedemann GmbH Fax: +49 621 3392239
Floßwörthstraße 41 e-mail: lholzheid at bihl-wiedemann.de
D-68199 Mannheim, Germany
---------------------------------------------------------------
More information about the splint-discuss
mailing list