diff options
author | Daniel Borkmann <dborkman@redhat.com> | 2013-03-16 13:43:16 +0100 |
---|---|---|
committer | Daniel Borkmann <dborkman@redhat.com> | 2013-03-16 13:43:16 +0100 |
commit | c69b4960fa4f48fcc7bd320bc34e4fc8de613bdc (patch) | |
tree | 0416dff0bb17c4fdbbc789bbed7243f957e8a213 /geoip.c | |
parent | 30e1aafbae487e63a1f1f294391bbdc993808c4b (diff) |
geoip: reorder statements, so that file handles are closed first
Coverty detected, when we are in an error condition, we do not close
file handles, but just return instead. Thus, reorder statements, so
that file handles are closed for sure.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Diffstat (limited to 'geoip.c')
-rw-r--r-- | geoip.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -236,16 +236,15 @@ again: printf("\n"); + close(fd); + close(sock); + if (totlen != rtotlen) { unlink(files[which].local); return -EIO; } - close(fd); - close(sock); - geoip_inflate(which); - unlink(zfile); return 0; |