diff options
| author | Laxmikant Rashinkar <LK.Rashinkar@gmail.com> | 2014-07-19 11:56:00 -0700 |
|---|---|---|
| committer | Laxmikant Rashinkar <LK.Rashinkar@gmail.com> | 2014-07-19 11:56:00 -0700 |
| commit | 3bb31876e797c7a13b4ffb7d67a5d710cbf4fab3 (patch) | |
| tree | 8888abf5bfb3b666027746c78a7466e09fa3a557 /libxrdp/xrdp_sec.c | |
| parent | c64b1544752547cede30647bb03ab1bbbc06d079 (diff) | |
| download | xrdp-proprietary-3bb31876e797c7a13b4ffb7d67a5d710cbf4fab3.tar.gz xrdp-proprietary-3bb31876e797c7a13b4ffb7d67a5d710cbf4fab3.zip | |
coverity: fixed resolution leak issues
Diffstat (limited to 'libxrdp/xrdp_sec.c')
| -rw-r--r-- | libxrdp/xrdp_sec.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/libxrdp/xrdp_sec.c b/libxrdp/xrdp_sec.c index d726f3e8..6ebdf715 100644 --- a/libxrdp/xrdp_sec.c +++ b/libxrdp/xrdp_sec.c @@ -771,7 +771,7 @@ xrdp_sec_send_media_lic_response(struct xrdp_sec *self) /*****************************************************************************/ static void APP_CC -xrdp_sec_rsa_op(struct xrdp_sec *self, char *out, char *in, int in_bytes, +xrdp_sec_rsa_op(struct xrdp_sec *self, char *out, char *in, int in_bytes, char *mod, char *exp) { ssl_mod_exp(out, self->rsa_key_bytes, in, in_bytes, @@ -1616,7 +1616,6 @@ xrdp_sec_process_mcs_data_channels(struct xrdp_sec *self, struct stream *s) { int num_channels; int index; - struct mcs_channel_item *channel_item; DEBUG(("processing channels, channel_code is %d", self->channel_code)); @@ -1641,16 +1640,19 @@ xrdp_sec_process_mcs_data_channels(struct xrdp_sec *self, struct stream *s) for (index = 0; index < num_channels; index++) { + struct mcs_channel_item *channel_item; + channel_item = (struct mcs_channel_item *) g_malloc(sizeof(struct mcs_channel_item), 1); if (!s_check_rem(s, 12)) { + g_free(channel_item); return 1; } in_uint8a(s, channel_item->name, 8); in_uint32_le(s, channel_item->flags); channel_item->chanid = MCS_GLOBAL_CHANNEL + (index + 1); - list_add_item(self->mcs_layer->channel_list, (tintptr)channel_item); + list_add_item(self->mcs_layer->channel_list, (tintptr) channel_item); DEBUG(("got channel flags %8.8x name %s", channel_item->flags, channel_item->name)); } @@ -1852,7 +1854,7 @@ xrdp_sec_out_mcs_data(struct xrdp_sec *self) gcc_size_ptr = s->p; /* RDPGCCUserDataResponseLength */ out_uint8s(s, 2); ud_ptr = s->p; /* User Data */ - + out_uint16_le(s, SEC_TAG_SRV_INFO); if (self->mcs_layer->iso_layer->selectedProtocol != -1) { @@ -1866,7 +1868,7 @@ xrdp_sec_out_mcs_data(struct xrdp_sec *self) out_uint8(s, 0); out_uint8(s, 8); out_uint8(s, 0); - if (self->mcs_layer->iso_layer->selectedProtocol != -1) + if (self->mcs_layer->iso_layer->selectedProtocol != -1) { /* ReqeustedProtocol */ out_uint32_le(s, self->mcs_layer->iso_layer->selectedProtocol); @@ -2060,7 +2062,7 @@ xrdp_sec_incoming(struct xrdp_sec *self) { item = (char *)list_get_item(items, index); value = (char *)list_get_item(values, index); - + if (g_strcasecmp(item, "pub_exp") == 0) { hex_str_to_bin(value, self->pub_exp, 4); |
