core/nego: Fix leak found by covscan
authorOndrej Holy <oholy@redhat.com>
Fri, 17 Aug 2018 14:16:37 +0000 (16:16 +0200)
committerOndrej Holy <oholy@redhat.com>
Wed, 22 Aug 2018 12:34:02 +0000 (14:34 +0200)
leaked_storage: Variable "wszPCB" going out of scope leaks the storage it points to.

libfreerdp/core/nego.c

index e7211ab..a1716a4 100644 (file)
@@ -342,6 +342,7 @@ BOOL nego_send_preconnection_pdu(rdpNego* nego)
 
        if (!s)
        {
+               free(wszPCB);
                WLog_ERR(TAG, "Stream_New failed!");
                return FALSE;
        }