GUACAMOLE-249: Do not attempt to free SVC-specific data if it hasn't actually been allocated.

This commit is contained in:
Michael Jumper 2020-01-06 13:35:08 -08:00
parent dc8c60f30f
commit 67c5bdfdfe
2 changed files with 4 additions and 0 deletions

View File

@ -209,6 +209,8 @@ void guac_rdp_pipe_svc_process_receive(guac_rdp_common_svc* svc,
void guac_rdp_pipe_svc_process_terminate(guac_rdp_common_svc* svc) { void guac_rdp_pipe_svc_process_terminate(guac_rdp_common_svc* svc) {
guac_rdp_pipe_svc* pipe_svc = (guac_rdp_pipe_svc*) svc->data; guac_rdp_pipe_svc* pipe_svc = (guac_rdp_pipe_svc*) svc->data;
if (pipe_svc == NULL)
return;
/* Remove and free SVC */ /* Remove and free SVC */
guac_rdp_pipe_svc_remove(svc->client, svc->name); guac_rdp_pipe_svc_remove(svc->client, svc->name);

View File

@ -150,6 +150,8 @@ void guac_rdpdr_process_connect(guac_rdp_common_svc* svc) {
void guac_rdpdr_process_terminate(guac_rdp_common_svc* svc) { void guac_rdpdr_process_terminate(guac_rdp_common_svc* svc) {
guac_rdpdr* rdpdr = (guac_rdpdr*) svc->data; guac_rdpdr* rdpdr = (guac_rdpdr*) svc->data;
if (rdpdr == NULL)
return;
int i; int i;