diff options
author | Ulrich Drepper <drepper@redhat.com> | 2006-04-08 19:35:24 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2006-04-08 19:35:24 +0000 |
commit | db67c2c98b89a5723af44df54f38b779de8d4a65 (patch) | |
tree | 8f0c926942134212e714d221e284f12cc59c1275 /nis | |
parent | 8b7600e8cf56d5409c5733ffee77838ca7aa4428 (diff) | |
download | glibc-db67c2c98b89a5723af44df54f38b779de8d4a65.tar.gz |
* io/fts.c (fts_build): Call fts_lfree in the two error cases
after the loop [Coverity CID 187].
* nis/nis_getservlist.c (nis_getservlist): Also free lookup result
in error case [Coverity CID 189].
* nis/nis_getservlist.c (nis_getservlist): One more free call
needed [Coverity CID 190].
Diffstat (limited to 'nis')
-rw-r--r-- | nis/nis_getservlist.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/nis/nis_getservlist.c b/nis/nis_getservlist.c index bea9d4dbc0..e57649d526 100644 --- a/nis/nis_getservlist.c +++ b/nis/nis_getservlist.c @@ -72,6 +72,10 @@ nis_getservlist (const_nis_name dir) free (serv[i]); } + free (serv); + + nis_freeresult (res); + return NULL; } @@ -141,8 +145,7 @@ nis_getservlist (const_nis_name dir) serv[0] = NULL; } - if (res != NULL) - nis_freeresult (res); + nis_freeresult (res); return serv; } |