diff options
author | Siddhesh Poyarekar <siddhesh@sourceware.org> | 2021-05-12 16:50:59 +0530 |
---|---|---|
committer | Siddhesh Poyarekar <siddhesh@sourceware.org> | 2021-05-13 08:05:19 +0530 |
commit | 7eeb05a3958407675d3c4c5351d8ed7738156fbf (patch) | |
tree | 259beaa4d1c847484a73669a91d1b39fd216e72d /inet/rcmd.c | |
parent | 900962f37f64c263db83ec8639847e8f6753b8d9 (diff) | |
download | glibc-7eeb05a3958407675d3c4c5351d8ed7738156fbf.zip glibc-7eeb05a3958407675d3c4c5351d8ed7738156fbf.tar.gz glibc-7eeb05a3958407675d3c4c5351d8ed7738156fbf.tar.bz2 |
inet: Free result from getaddrinfo
Coverity discovered paths where the result from getaddrinfo was not
freed.
Diffstat (limited to 'inet/rcmd.c')
-rw-r--r-- | inet/rcmd.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/inet/rcmd.c b/inet/rcmd.c index 452ff7d..0cfdaee 100644 --- a/inet/rcmd.c +++ b/inet/rcmd.c @@ -153,6 +153,7 @@ rcmd_af (char **ahost, u_short rport, const char *locuser, const char *remuser, free (ahostbuf); ahostbuf = __strdup (res->ai_canonname); if (ahostbuf == NULL) { + freeaddrinfo (res); __fxprintf(NULL, "%s", _("rcmd: Cannot allocate memory\n")); return -1; |