mirror of https://github.com/PentHertz/srsLTE.git
more coverity fixes
This commit is contained in:
parent
07cd9ae528
commit
e5a04844ec
|
@ -82,6 +82,7 @@ bool read(std::string filename) {
|
|||
written[thread][msg] = true;
|
||||
} else {
|
||||
perror("Wrong thread and/or msg");
|
||||
fclose(f);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -591,7 +591,7 @@ int main(int argc, char *argv[])
|
|||
int setup_if_addr(char *ip_addr)
|
||||
{
|
||||
char *dev = (char*) "tun_srsenb";
|
||||
int sock = 0;
|
||||
int sock;
|
||||
|
||||
// Construct the TUN device
|
||||
int tun_fd = open("/dev/net/tun", O_RDWR);
|
||||
|
@ -642,10 +642,12 @@ int setup_if_addr(char *ip_addr)
|
|||
perror("ioctl");
|
||||
goto clean_exit;
|
||||
}
|
||||
shutdown(sock, SHUT_RDWR);
|
||||
|
||||
return(tun_fd);
|
||||
|
||||
clean_exit:
|
||||
shutdown(sock, SHUT_RDWR);
|
||||
close(tun_fd);
|
||||
return SRSLTE_ERROR;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue