Skip to content

Commit

Permalink
dlt_daemon_socket: leave while socket binds fails
Browse files Browse the repository at this point in the history
CID 351398 (COVESA#1 of 1): Use after close (USE_AFTER_FREE)
8. pass_closed_arg: Passing closed handle *sock as an argument to dlt_daemon_socket_get_send_qeue_max_size

Signed-off-by: Phong Tran <[email protected]>
  • Loading branch information
phongt committed Dec 10, 2019
1 parent a7989b2 commit c94c7c7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/daemon/dlt_daemon_socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ int dlt_daemon_socket_open(int *sock, unsigned int servPort, char *ip)
lastErrno = errno; /*close() may set errno too */
close(*sock);
dlt_vlog(LOG_WARNING, "dlt_daemon_socket_open: bind() error %d: %s\n", lastErrno, strerror(lastErrno));
return -1;
}

/*listen */
Expand Down

0 comments on commit c94c7c7

Please sign in to comment.