Index: cdr/cdr_sqlite3_custom.c =================================================================== --- cdr/cdr_sqlite3_custom.c (revision 137900) +++ cdr/cdr_sqlite3_custom.c (working copy) @@ -87,7 +87,7 @@ ast_log(LOG_ERROR, "Out of memory creating temporary buffer for column list for table '%s.'\n", table); return -1; } - if (!(cols = ast_strdup(tmp))) { + if (!(cols = ast_strdupa(tmp))) { ast_log(LOG_ERROR, "Out of memory creating temporary buffer for column list for table '%s.'\n", table); ast_free(column_string); return -1; @@ -98,7 +98,6 @@ if (!escaped) { ast_log(LOG_ERROR, "Out of memory creating entry for column '%s' in table '%s.'\n", col, table); ast_free(column_string); - ast_free(cols); return -1; } if (!column_string->used) @@ -110,11 +109,9 @@ if (!(columns = ast_strdup(column_string->str))) { ast_log(LOG_ERROR, "Out of memory copying columns string for table '%s.'\n", table); ast_free(column_string); - ast_free(cols); return -1; } ast_free(column_string); - ast_free(cols); return 0; } @@ -129,7 +126,7 @@ ast_log(LOG_WARNING, "Values not specified. Module not loaded.\n"); return -1; } - if (!(vals = ast_strdup(tmp))) { + if (!(vals = ast_strdupa(tmp))) { ast_log(LOG_ERROR, "Out of memory creating temporary buffer for value '%s'\n", tmp); return -1; } @@ -139,14 +136,12 @@ value = ast_calloc(sizeof(char), sizeof(*value) + strlen(val) + 1); if (!value) { ast_log(LOG_ERROR, "Out of memory creating entry for value '%s'\n", val); - ast_free(vals); return -1; } value->expression = (char *) value + sizeof(*value); ast_copy_string(value->expression, val, strlen(val) + 1); AST_LIST_INSERT_TAIL(&sql_values, value, list); } - ast_free(vals); return 0; }