func: static void goodB2G() wchar_t * data ; data = NULL; CWE401_Memory_Leak__wchar_t_malloc_84_goodB2G * goodB2GObject = new CWE401_Memory_Leak__wchar_t_malloc_84_goodB2G ( data ) ; CWE401_Memory_Leak__wchar_t_malloc_84_goodB2G::CWE401_Memory_Leak__wchar_t_malloc_84_goodB2G(wchar_t * dataCopy) data = dataCopy; data = ( wchar_t * ) malloc ( 100 * sizeof ( wchar_t ) ); wcscpy ( data , L "A String" ) printWLine ( data ); delete goodB2GObject CWE401_Memory_Leak__wchar_t_malloc_84_goodB2G::~CWE401_Memory_Leak__wchar_t_malloc_84_goodB2G() free ( data ); 