mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-22 20:56:39 +00:00
fix crashes with MALLOC_DEBUG enabled that were a result of my recent thread
storage changes (fixes issue #7595) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38286 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
11
cli.c
11
cli.c
@@ -57,9 +57,18 @@ static pthread_once_t ast_cli_buf_once = PTHREAD_ONCE_INIT;
|
||||
/*! \brief Initial buffer size for resulting strings in ast_cli() */
|
||||
#define AST_CLI_MAXSTRLEN 256
|
||||
|
||||
#ifdef __AST_DEBUG_MALLOC
|
||||
static void FREE(void *ptr)
|
||||
{
|
||||
free(ptr);
|
||||
}
|
||||
#else
|
||||
#define FREE free
|
||||
#endif
|
||||
|
||||
static void ast_cli_buf_key_create(void)
|
||||
{
|
||||
pthread_key_create(&ast_cli_buf_key, free);
|
||||
pthread_key_create(&ast_cli_buf_key, FREE);
|
||||
}
|
||||
|
||||
void ast_cli(int fd, char *fmt, ...)
|
||||
|
Reference in New Issue
Block a user