codec/nsc: Fix leak found by covscan
authorOndrej Holy <oholy@redhat.com>
Fri, 17 Aug 2018 13:01:25 +0000 (15:01 +0200)
committerOndrej Holy <oholy@redhat.com>
Wed, 22 Aug 2018 11:35:43 +0000 (13:35 +0200)
leaked_storage: Variable "s" going out of scope leaks the storage it points to.

libfreerdp/codec/nsc.c

index b674548..d0547cd 100644 (file)
@@ -383,6 +383,7 @@ BOOL nsc_process_message(NSC_CONTEXT* context, UINT16 bpp,
                        break;
 
                default:
+                       Stream_Free(s, TRUE);
                        return FALSE;
        }