diff options
author | Laxmikant Rashinkar <LK.Rashinkar@gmail.com> | 2014-07-27 15:29:12 -0700 |
---|---|---|
committer | Laxmikant Rashinkar <LK.Rashinkar@gmail.com> | 2014-07-27 15:29:12 -0700 |
commit | e4654b57ca19118277219b6b430c6e0dc7b7984f (patch) | |
tree | 2fd0e16d43096619faf208105f91ab33a1c1acf5 | |
parent | a9d7c13147419532cc668e797d949413de895be5 (diff) | |
download | xrdp-proprietary-e4654b57ca19118277219b6b430c6e0dc7b7984f.tar.gz xrdp-proprietary-e4654b57ca19118277219b6b430c6e0dc7b7984f.zip |
coverity: Resource leak (2nd round)
-rw-r--r-- | sesman/libscp/libscp_v1c.c | 1 | ||||
-rw-r--r-- | sesman/libscp/libscp_v1c_mng.c | 2 | ||||
-rw-r--r-- | vnc/vnc.c | 2 | ||||
-rw-r--r-- | xrdp/xrdp_bitmap.c | 2 | ||||
-rw-r--r-- | xrdp/xrdp_login_wnd.c | 3 | ||||
-rw-r--r-- | xup/xup.c | 6 |
6 files changed, 12 insertions, 4 deletions
diff --git a/sesman/libscp/libscp_v1c.c b/sesman/libscp/libscp_v1c.c index 848b3437..7d1b9db8 100644 --- a/sesman/libscp/libscp_v1c.c +++ b/sesman/libscp/libscp_v1c.c @@ -215,7 +215,6 @@ scp_v1c_get_session_list(struct SCP_CONNECTION *c, int *scount, if (cmd != 42) { - g_free(ds); return SCP_CLIENT_STATE_SEQUENCE_ERR; } diff --git a/sesman/libscp/libscp_v1c_mng.c b/sesman/libscp/libscp_v1c_mng.c index dc1016db..59762e36 100644 --- a/sesman/libscp/libscp_v1c_mng.c +++ b/sesman/libscp/libscp_v1c_mng.c @@ -164,7 +164,6 @@ scp_v1c_mng_get_session_list(struct SCP_CONNECTION *c, int *scount, if (0 != scp_tcp_force_recv(c->in_sck, c->in_s->data, size - 8)) { log_message(LOG_LEVEL_WARNING, "[v1c_mng:%d] connection aborted: network error", __LINE__); - g_free(ds); return SCP_CLIENT_STATE_NETWORK_ERR; } @@ -181,7 +180,6 @@ scp_v1c_mng_get_session_list(struct SCP_CONNECTION *c, int *scount, if (cmd != SCP_CMD_MNG_LIST) /* session list */ { log_message(LOG_LEVEL_WARNING, "[v1c_mng:%d] connection aborted: sequence error", __LINE__); - g_free(ds); return SCP_CLIENT_STATE_SEQUENCE_ERR; } @@ -972,6 +972,8 @@ lib_mod_connect(struct vnc *v) if (v->sck < 0) { v->server_msg(v, "VNC error: socket create error, g_tcp_socket() failed", 0); + free_stream(s); + free_stream(pixel_format); return 1; } diff --git a/xrdp/xrdp_bitmap.c b/xrdp/xrdp_bitmap.c index 3bbebfd9..8265f167 100644 --- a/xrdp/xrdp_bitmap.c +++ b/xrdp/xrdp_bitmap.c @@ -413,7 +413,6 @@ xrdp_bitmap_load(struct xrdp_bitmap *self, const char *filename, int *palette) return 1; } - s = (struct stream *)NULL; fd = g_file_open(filename); if (fd != -1) @@ -445,6 +444,7 @@ xrdp_bitmap_load(struct xrdp_bitmap *self, const char *filename, int *palette) { log_message(LOG_LEVEL_ERROR, "xrdp_bitmap_load: seek error in file %s\n", filename); + free_stream(s); g_file_close(fd); return 1; } diff --git a/xrdp/xrdp_login_wnd.c b/xrdp/xrdp_login_wnd.c index b519f913..6fe47c3f 100644 --- a/xrdp/xrdp_login_wnd.c +++ b/xrdp/xrdp_login_wnd.c @@ -462,6 +462,9 @@ xrdp_wm_login_fill_in_combo(struct xrdp_wm *self, struct xrdp_bitmap *b) if (fd < 0) { log_message(LOG_LEVEL_ERROR, "Could not read xrdp ini file %s", cfg_file); + list_delete(sections); + list_delete(section_names); + list_delete(section_values); return 1; } @@ -213,13 +213,19 @@ lib_mod_connect(struct mod *mod) { mod->sck = g_tcp_local_socket(); if (mod->sck < 0) + { + free_stream(s); return 1; + } } else { mod->sck = g_tcp_socket(); if (mod->sck < 0) + { + free_stream(s); return 1; + } g_tcp_set_non_blocking(mod->sck); g_tcp_set_no_delay(mod->sck); |