diff options
author | Derek R. Price <derek@ximbiot.com> | 2005-09-13 13:23:57 +0000 |
---|---|---|
committer | Derek R. Price <derek@ximbiot.com> | 2005-09-13 13:23:57 +0000 |
commit | 639a9c73113836fec5694af9a938a6556e7dbc3c (patch) | |
tree | bf04c5c2ab32d39b84d6b1c46aa6a8398150d5c8 /lib/canon-host.c | |
parent | e44c0fd283edb9ed01a7789cf58f4254f0e582fe (diff) | |
download | gnulib-639a9c73113836fec5694af9a938a6556e7dbc3c.tar.gz |
* canon-host.c (canon_host_r): Set *cherror on memory allocation
failure.
Reported by Jim Meyering <jim@meyering.net>.
Diffstat (limited to 'lib/canon-host.c')
-rw-r--r-- | lib/canon-host.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/canon-host.c b/lib/canon-host.c index dcbec53385..e2bd1a773b 100644 --- a/lib/canon-host.c +++ b/lib/canon-host.c @@ -72,6 +72,8 @@ canon_host_r (char const *host, int *cherror) if (!status) { retval = strdup (res->ai_canonname); + if (!retval && cherror) + *cherror = EAI_MEMORY; freeaddrinfo (res); } else if (cherror) |