mirror of
https://github.com/github/codeql.git
synced 2025-12-25 05:06:34 +01:00
10 lines
260 B
C++
10 lines
260 B
C++
int f() {
|
|
try {
|
|
int sockfd = socket(AF_INET, SOCK_STREAM, 0);
|
|
do_stuff(sockfd);
|
|
return sockfd; //if there are no exceptions, the socket is returned
|
|
} catch (int do_stuff_exception) {
|
|
return -1; //return error value, but sockfd may still be open
|
|
}
|
|
}
|