diff options
Diffstat (limited to 'monitor.c')
-rw-r--r-- | monitor.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -1625,8 +1625,7 @@ mm_get_kex(Buffer *m) | |||
1625 | void *blob; | 1625 | void *blob; |
1626 | u_int bloblen; | 1626 | u_int bloblen; |
1627 | 1627 | ||
1628 | kex = xmalloc(sizeof(*kex)); | 1628 | kex = xcalloc(1, sizeof(*kex)); |
1629 | memset(kex, 0, sizeof(*kex)); | ||
1630 | kex->session_id = buffer_get_string(m, &kex->session_id_len); | 1629 | kex->session_id = buffer_get_string(m, &kex->session_id_len); |
1631 | if ((session_id2 == NULL) || | 1630 | if ((session_id2 == NULL) || |
1632 | (kex->session_id_len != session_id2_len) || | 1631 | (kex->session_id_len != session_id2_len) || |
@@ -1796,9 +1795,8 @@ monitor_init(void) | |||
1796 | struct monitor *mon; | 1795 | struct monitor *mon; |
1797 | int pair[2]; | 1796 | int pair[2]; |
1798 | 1797 | ||
1799 | mon = xmalloc(sizeof(*mon)); | 1798 | mon = xcalloc(1, sizeof(*mon)); |
1800 | 1799 | ||
1801 | mon->m_pid = 0; | ||
1802 | monitor_socketpair(pair); | 1800 | monitor_socketpair(pair); |
1803 | 1801 | ||
1804 | mon->m_recvfd = pair[0]; | 1802 | mon->m_recvfd = pair[0]; |