[svn-commits] dlee: branch dlee/stasis-http r383983 - /team/dlee/stasis-http/tests/
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Wed Mar 27 09:56:49 CDT 2013
Author: dlee
Date: Wed Mar 27 09:56:45 2013
New Revision: 383983
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=383983
Log:
Fixed null derefernce in tests
Modified:
team/dlee/stasis-http/tests/test_stasis_http.c
Modified: team/dlee/stasis-http/tests/test_stasis_http.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/stasis-http/tests/test_stasis_http.c?view=diff&rev=383983&r1=383982&r2=383983
==============================================================================
--- team/dlee/stasis-http/tests/test_stasis_http.c (original)
+++ team/dlee/stasis-http/tests/test_stasis_http.c Wed Mar 27 09:56:45 2013
@@ -158,8 +158,9 @@
*/
static struct stasis_http_response *response_alloc(void)
{
- struct stasis_http_response *ret = ast_calloc(1, sizeof(struct stasis_http_response));
- return ret;
+ struct stasis_http_response *resp = ast_calloc(1, sizeof(struct stasis_http_response));
+ resp->headers = ast_str_create(24);
+ return resp;
}
/*!
@@ -168,6 +169,7 @@
*/
static void response_free(struct stasis_http_response *resp)
{
+ ast_free(resp->headers);
ast_json_unref(resp->message);
ast_free(resp);
}
More information about the svn-commits
mailing list