summaryrefslogtreecommitdiffstats
path: root/freerdp1/xrdp-freerdp.c
diff options
context:
space:
mode:
Diffstat (limited to 'freerdp1/xrdp-freerdp.c')
-rw-r--r--freerdp1/xrdp-freerdp.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/freerdp1/xrdp-freerdp.c b/freerdp1/xrdp-freerdp.c
index 45d1a18d..39d95229 100644
--- a/freerdp1/xrdp-freerdp.c
+++ b/freerdp1/xrdp-freerdp.c
@@ -1379,7 +1379,13 @@ mod_exit(struct mod* mod)
{
return 0;
}
-
+ if(mod->inst == NULL)
+ {
+ LLOGLN(0, ("mod_exit - null pointer for inst:"));
+ g_free(mod);
+ return 0 ;
+ }
+ freerdp_disconnect(mod->inst);
if ((mod->vmaj == 1) && (mod->vmin == 0) && (mod->vrev == 1))
{
/* this version has a bug with double free in freerdp_free */