summaryrefslogtreecommitdiff
path: root/channel.c
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2006-07-23 15:21:44 +0000
committerRussell Bryant <russell@russellbryant.com>2006-07-23 15:21:44 +0000
commitfb94a4933b7cacac7c536abe4ff08b2f97ba7974 (patch)
tree5838909e9619e724db3ddeca8e0bcd98b81b7f7a /channel.c
parenta1fb7a2da320ca169a58f355256d4172613903b9 (diff)
ast_malloc is sufficient here, since snprintf is called on the buffer
immediately after it gets allocated, which will automatically NULL terminate the string git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38129 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channel.c')
-rw-r--r--channel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/channel.c b/channel.c
index 551f6e5c3..2c51b6950 100644
--- a/channel.c
+++ b/channel.c
@@ -515,7 +515,7 @@ char *ast_state2str(int state)
default:
pthread_once(&state2str_buf_once, state2str_buf_key_create);
if (!(buf = pthread_getspecific(state2str_buf_key))) {
- if (!(buf = ast_calloc(1, STATE2STR_BUFSIZE)))
+ if (!(buf = ast_malloc(STATE2STR_BUFSIZE)))
return NULL;
pthread_setspecific(state2str_buf_key, buf);
}