nameservice: do not close an fd that is not open
authorFerry Huberts <ferry.huberts@pelagic.nl>
Tue, 23 Oct 2012 11:18:05 +0000 (13:18 +0200)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Tue, 23 Oct 2012 11:45:14 +0000 (13:45 +0200)
commit13d96321784f4f6c6227b9d30a8662bb219be7a3
tree97bbeb11001dd7bfa17fd7febb5159a0c1c492ae
parentff32a94d8124569d245728b65b622fde757fe0dc
nameservice: do not close an fd that is not open

Coverity:
CID 739644 (#1 of 1): Dereference after null check (FORWARD_NULL)At (11): Passing null pointer "add_hosts" to function "fclose(FILE *)", which dereferences it.

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
lib/nameservice/src/nameservice.c