Browse Source

change this to a better initalization since malloc isn't spelled calloc here..

remotes/client/ssh-main
John-Mark Gurney 3 years ago
parent
commit
71bcb0ebbf
1 changed files with 5 additions and 3 deletions
  1. +5
    -3
      ggatessh/ggatessh.c

+ 5
- 3
ggatessh/ggatessh.c View File

@@ -696,9 +696,11 @@ proc_thread(void *arg __unused)
session = start_conn.c_session;

gsc = malloc(sizeof *gsc);
gsc->sc_ssh_session = start_conn.c_session;
gsc->sc_session = start_conn.c_sftp_session;
gsc->sc_handle = start_conn.c_handle;
*gsc = (struct ggs_sess_cache){
.sc_ssh_session = start_conn.c_session,
.sc_session = start_conn.c_sftp_session,
.sc_handle = start_conn.c_handle,
};

TAILQ_INSERT_HEAD(&session_cache, gsc, sc_next);
gsc = NULL;


Loading…
Cancel
Save