xp_comm_proj/rd_dicom/Papyrus3/PapyEallocPC3.c
/* modify it to have the pointer on the pointer to really put it to NULL */
modify it to have the pointer on the pointer to really put it to NULL
modify it to have the pointer on the pointer to really put it to NULL
void
efree3 (void **p)
{
#ifdef GB_ALLOC
    HGLOBAL hglb;
    DWORD dw;
    if (*p == NULL)
      return;
#ifdef _WIN16_
    dw = GlobalHandle (SELECTOROF(*p));
    hglb = (HGLOBAL) (LOWORD (dw));
#else
    hglb = GlobalHandle (*p);
#endif
    GlobalUnlock (hglb);
    GlobalFree (hglb);
    *p = NULL;
#else
    free (*p);
    *p = NULL;
#endif
}
void efree3 ( void * * p ) { #ifdef GB_ALLOC HGLOBAL hglb ; DWORD dw ; if ( * p == NULL ) return ; #ifdef _WIN16_ dw = GlobalHandle ( SELECTOROF ( * p ) ) ; hglb = ( HGLOBAL ) ( LOWORD ( dw ) ) ; #else hglb = GlobalHandle ( * p ) ; #endif GlobalUnlock ( hglb ) ; GlobalFree ( hglb ) ; * p = NULL ; #else free ( * p ) ; * p = NULL ; #endif }
modify it to have the pointer on the pointer to really put it to NULL
modify it to have the pointer on the pointer to really put it to NULL