示例#1
0
文件: dlerror.c 项目: ddstreet/glibc
/* Free the dlerror-related resources.  */
void
__dlerror_main_freeres (void)
{
  void *mem;
  /* Free the global memory if used.  */
  check_free (&last_result);
  /* Free the TSD memory if used.  */
  mem = __libc_getspecific (key);
  if (mem != NULL)
    free_key_mem (mem);
}
示例#2
0
文件: dlerror.c 项目: bminor/glibc
/* Free the dlerror-related resources.  */
void
__dlerror_main_freeres (void)
{
  /* Free the global memory if used.  */
  check_free (&last_result);

  if (__libc_once_get (once) && static_buf == NULL)
    {
      /* init () has been run and we don't use the static buffer.
	 So we have a valid key.  */
      void *mem;
      /* Free the TSD memory if used.  */
      mem = __libc_getspecific (key);
      if (mem != NULL)
	free_key_mem (mem);
    }
}