mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 03:20:57 +00:00
Convert a few places to use ast_calloc_with_stringfields where applicable.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@240368 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -541,13 +541,9 @@ static int load_module(void)
|
||||
dberrhandle(tds_error_handler);
|
||||
dbmsghandle(tds_message_handler);
|
||||
|
||||
settings = ast_calloc(1, sizeof(*settings));
|
||||
settings = ast_calloc_with_stringfields(1, struct cel_tds_config, 256);
|
||||
|
||||
if (!settings || ast_string_field_init(settings, 256)) {
|
||||
if (settings) {
|
||||
ast_free(settings);
|
||||
settings = NULL;
|
||||
}
|
||||
if (!settings) {
|
||||
dbexit();
|
||||
return AST_MODULE_LOAD_DECLINE;
|
||||
}
|
||||
|
Reference in New Issue
Block a user