libc/netdb: fix memory leak in freeaddrinfo()
authorWonsang Ryou <wonsang.yoo@samsung.com>
Fri, 31 Mar 2017 07:27:35 +0000 (16:27 +0900)
committerHeesub Shin <heesub.shin@samsung.com>
Tue, 18 Apr 2017 03:02:04 +0000 (12:02 +0900)
commit5edc56cf306287365b9854b675be8611c4dfa33a
treefcf0622d286289233c7b52bacfef0bfd257205d5
parente622798df3a232f3d3cd82248ba2bd733b9f51dd
libc/netdb: fix memory leak in freeaddrinfo()

This patch fixes the memory leak problem in freeaddrinfo().

In freeaddrinfo(), ai->ai_canonname is not freed even if it is
allocated by getaddrinfo(). So it will cause memory leak.

Change-Id: Iede7ad7380f92db07fc1e581984557ebea3d308e
Signed-off-by: Wonsang Ryou <wonsang.yoo@samsung.com>
lib/libc/netdb/lib_getaddrinfo.c