diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-07-23 15:21:44 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-07-23 15:21:44 +0000 |
commit | 8b4490a13349004c54d21581380d7a2eb007263a (patch) | |
tree | 5838909e9619e724db3ddeca8e0bcd98b81b7f7a /channel.c | |
parent | 54da881b9321d3c7e52afd611984da253b18257c (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: http://svn.digium.com/svn/asterisk/trunk@38129 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channel.c')
-rw-r--r-- | channel.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); } |