diff options
author | Tilghman Lesher <tilghman@meg.abyt.es> | 2007-06-06 21:20:11 +0000 |
---|---|---|
committer | Tilghman Lesher <tilghman@meg.abyt.es> | 2007-06-06 21:20:11 +0000 |
commit | 9d05ff8ed5f2c898370896ff7a8bb67885596ba1 (patch) | |
tree | 5503cb153c9de46c07e3a0a521cc996926ed375b /res/res_speech.c | |
parent | 033a3df22aa68f04327066e0567b76f73c437651 (diff) |
Issue 9869 - replace malloc and memset with ast_calloc, and other coding guidelines changes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@67864 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_speech.c')
-rw-r--r-- | res/res_speech.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/res/res_speech.c b/res/res_speech.c index 960c7f42c..67dce81cf 100644 --- a/res/res_speech.c +++ b/res/res_speech.c @@ -105,16 +105,16 @@ int ast_speech_results_free(struct ast_speech_result *result) prev_result = current_result; /* Deallocate what we can */ if (current_result->text != NULL) { - free(current_result->text); + ast_free(current_result->text); current_result->text = NULL; } if (current_result->grammar != NULL) { - free(current_result->grammar); + ast_free(current_result->grammar); current_result->grammar = NULL; } /* Move on and then free ourselves */ current_result = current_result->next; - free(prev_result); + ast_free(prev_result); prev_result = NULL; } @@ -187,7 +187,7 @@ struct ast_speech *ast_speech_new(char *engine_name, int format) /* Pass ourselves to the engine so they can set us up some more and if they error out then do not create a structure */ if (engine->create(new_speech)) { ast_mutex_destroy(&new_speech->lock); - free(new_speech); + ast_free(new_speech); new_speech = NULL; } @@ -211,10 +211,10 @@ int ast_speech_destroy(struct ast_speech *speech) /* If a processing sound is set - free the memory used by it */ if (speech->processing_sound) - free(speech->processing_sound); + ast_free(speech->processing_sound); /* Aloha we are done */ - free(speech); + ast_free(speech); return res; } |