text: /* TEMPLATE GENERATED TESTCASE FILE
  Filename: CWE415_Double_Free__new_delete_char_54b.cpp
  Label Definition File: CWE415_Double_Free__new_delete.label.xml
  Template File: sources-sinks-54b.tmpl.cpp
  */
  /*
   * @description
   * CWE: 415 Double Free
   * BadSource:  Allocate data using new and Deallocae data using delete
   * GoodSource: Allocate data using new
   * Sinks:
   *    GoodSink: do nothing
   *    BadSink : Deallocate data using delete
   * Flow Variant: 54 Data flow: data passed as an argument from one function through three others to a fifth; all five functions are in different source files
   *
   * */
  
  #include "std_testcase.h"
  
  #include <wchar.h>
  
  namespace CWE415_Double_Free__new_delete_char_54
  {
  
  #ifndef OMITBAD
  
  /* bad function declaration */
  void badSink_c(char * data);
  
  void badSink_b(char * data)
  {
      badSink_c(data);
  }
  
  #endif /* OMITBAD */
  
  #ifndef OMITGOOD
  
  /* goodG2B uses the GoodSource with the BadSink */
  void goodG2BSink_c(char * data);
  
  void goodG2BSink_b(char * data)
  {
      goodG2BSink_c(data);
  }
  
  /* goodB2G uses the BadSource with the GoodSink */
  void goodB2GSink_c(char * data);
  
  void goodB2GSink_b(char * data)
  {
      goodB2GSink_c(data);
  }
  
  #endif /* OMITGOOD */
  
  } /* close namespace */
  