tc/em_ipset: Don't leak sockfd on error path

Signed-off-by: Phil Sutter <phil@nwl.cc>
This commit is contained in:
Phil Sutter 2017-08-17 19:09:31 +02:00 committed by Stephen Hemminger
parent 4b45ae221e
commit 3e587d9f43
1 changed files with 1 additions and 0 deletions

View File

@ -84,6 +84,7 @@ static int get_version(unsigned int *version)
res = getsockopt(sockfd, SOL_IP, SO_IP_SET, &req_version, &size);
if (res != 0) {
perror("xt_set getsockopt");
close(sockfd);
return -1;
}