summaryrefslogtreecommitdiff
path: root/main/cdr.c
diff options
context:
space:
mode:
authorsnuffy <snuffy22@gmail.com>2015-05-15 16:54:26 +1000
committerJoshua Colp <jcolp@digium.com>2015-05-15 09:59:29 -0500
commite48d29054f6092ad758d8b67515dcc6226de2e1b (patch)
tree2a127819d91d7ead42119c0ae4c699e19f402a3b /main/cdr.c
parent1ba7845851f5b5cf952276dd7f1f1591c1190b23 (diff)
cdr: Fix 'core show channel' CDR variable truncation.
When the new Bridging API was implemented, the workspace variable changed to a malloc'd string, causing sizeof() to always be 8 (char). Revert back to stored on stack string for workspace. ASTERISK-25090 #close Change-Id: I51e610ae87371df771ce7693a955510efb90f8f7
Diffstat (limited to 'main/cdr.c')
-rw-r--r--main/cdr.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/main/cdr.c b/main/cdr.c
index 9b32f9d9f..c6f49f16f 100644
--- a/main/cdr.c
+++ b/main/cdr.c
@@ -3096,13 +3096,9 @@ int ast_cdr_serialize_variables(const char *channel_name, struct ast_str **buf,
struct cdr_object *it_cdr;
struct ast_var_t *variable;
const char *var;
- RAII_VAR(char *, workspace, ast_malloc(256), ast_free);
+ char workspace[256];
int total = 0, x = 0, i;
- if (!workspace) {
- return 0;
- }
-
if (!cdr) {
RAII_VAR(struct module_config *, mod_cfg,
ao2_global_obj_ref(module_configs), ao2_cleanup);