summaryrefslogtreecommitdiff
path: root/addons/chan_ooh323.c
diff options
context:
space:
mode:
authorAlexandr Anikin <may@telecom-service.ru>2011-02-05 22:16:07 +0000
committerAlexandr Anikin <may@telecom-service.ru>2011-02-05 22:16:07 +0000
commit7f86bd2f167943099dbe50ee2d12b04d9235c8d4 (patch)
tree05880959a8882b2e5d813f52022b0261688e9e5c /addons/chan_ooh323.c
parent484f9bec0adc532a372e0c2ff0c2f1e2c0e970e7 (diff)
fix trivial issue after dvossel patch, initial zero fill user and peer
structure before cap structure allocated. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@306499 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'addons/chan_ooh323.c')
-rw-r--r--addons/chan_ooh323.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/chan_ooh323.c b/addons/chan_ooh323.c
index 6da6c1cd1..4debfa269 100644
--- a/addons/chan_ooh323.c
+++ b/addons/chan_ooh323.c
@@ -2179,11 +2179,11 @@ static struct ooh323_user *build_user(const char *name, struct ast_variable *v)
user = ast_calloc(1,sizeof(struct ooh323_user));
if (user) {
+ memset(user, 0, sizeof(struct ooh323_user));
if (!(user->cap = ast_format_cap_alloc_nolock())) {
ast_free(user);
return NULL;
}
- memset(user, 0, sizeof(struct ooh323_user));
ast_mutex_init(&user->lock);
ast_copy_string(user->name, name, sizeof(user->name));
ast_format_cap_copy(user->cap, gCap);
@@ -2292,11 +2292,11 @@ static struct ooh323_peer *build_peer(const char *name, struct ast_variable *v,
peer = ast_calloc(1, sizeof(*peer));
if (peer) {
+ memset(peer, 0, sizeof(struct ooh323_peer));
if (!(peer->cap = ast_format_cap_alloc_nolock())) {
ast_free(peer);
return NULL;
}
- memset(peer, 0, sizeof(struct ooh323_peer));
ast_mutex_init(&peer->lock);
ast_copy_string(peer->name, name, sizeof(peer->name));
ast_format_cap_copy(peer->cap, gCap);