mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-19 08:11:21 +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:
@@ -4430,12 +4430,7 @@ int ast_manager_register2(const char *action, int auth, int (*func)(struct manse
|
||||
char *tmpxml;
|
||||
#endif
|
||||
|
||||
if (!(cur = ast_calloc(1, sizeof(*cur)))) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (ast_string_field_init(cur, 128)) {
|
||||
ast_free(cur);
|
||||
if (!(cur = ast_calloc_with_stringfields(1, struct manager_action, 128))) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user