From: Russell Bryant Date: Thu, 24 May 2007 22:07:39 +0000 (+0000) Subject: Check the result of ast_string_field_init() in ast_channel_alloc() X-Git-Tag: 1.4.5~120 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=11d6381ec0b381e54bbe6a4eb70ff6d6ce7894f8;p=thirdparty%2Fasterisk.git Check the result of ast_string_field_init() in ast_channel_alloc() git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@66070 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/main/channel.c b/main/channel.c index 093296b31e..f7def7e903 100644 --- a/main/channel.c +++ b/main/channel.c @@ -742,7 +742,8 @@ struct ast_channel *ast_channel_alloc(int needqueue, int state, const char *cid_ return NULL; } - ast_string_field_init(tmp, 128); + if ((ast_string_field_init(tmp, 128))) + return NULL; /* Don't bother initializing the last two FD here, because they will *always* be set just a few lines down (AST_TIMING_FD,