Skip to content

Commit

Permalink
conn_sock: fix double free
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Hunt <pehunt@redhat.com>
  • Loading branch information
haircommander committed Jan 20, 2021
1 parent 3af2776 commit d9bd8f8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/conn_sock.c
Expand Up @@ -170,9 +170,10 @@ static char *bind_unix_socket(char *socket_relative_name, int sock_type, mode_t


/*
* we use the fullpath for operations that aren't as limited in length as socket_addr.sun_path
* We use the fullpath for operations that aren't as limited in length as socket_addr.sun_path
* Cleanup of this variable is up to the caller
*/
_cleanup_free_ char *sock_fullpath = g_build_filename(parent_dir, socket_relative_name, NULL);
char *sock_fullpath = g_build_filename(parent_dir, socket_relative_name, NULL);

/*
* We make the socket non-blocking to avoid a race where client aborts connection
Expand Down

0 comments on commit d9bd8f8

Please sign in to comment.