From: Seonah Moon Date: Tue, 13 Dec 2016 01:50:12 +0000 (+0900) Subject: Bug fix: assign NULL after releasing memory X-Git-Tag: submit/tizen_3.0/20161213.104012^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c9eda34acf17bb1c9caef44865377227eee97051;p=platform%2Fcore%2Fapi%2Fhttp.git Bug fix: assign NULL after releasing memory Change-Id: I44c679359ccfdc3996cb0af2d14a75e40cdc9dc3 Signed-off-by: Seonah Moon --- diff --git a/packaging/capi-network-http.spec b/packaging/capi-network-http.spec index 2840907..eae907d 100644 --- a/packaging/capi-network-http.spec +++ b/packaging/capi-network-http.spec @@ -1,6 +1,6 @@ Name: capi-network-http Summary: Http Framework -Version: 0.0.16 +Version: 0.0.17 Release: 0 Group: System/Network License: Apache-2.0 diff --git a/src/http_transaction.c b/src/http_transaction.c index 4048508..f2b4fcf 100644 --- a/src/http_transaction.c +++ b/src/http_transaction.c @@ -634,12 +634,19 @@ API int http_transaction_destroy(http_transaction_h http_transaction) transaction->proxy_auth_type = FALSE; transaction->auth_scheme = HTTP_AUTH_NONE; + transaction->progress_cb = NULL; transaction->header_cb = NULL; transaction->body_cb = NULL; transaction->write_cb = NULL; transaction->completed_cb = NULL; transaction->aborted_cb = NULL; - transaction->progress_cb = NULL; + + transaction->progress_user_data = NULL; + transaction->header_user_data = NULL; + transaction->body_user_data = NULL; + transaction->write_user_data = NULL; + transaction->completed_user_data = NULL; + transaction->aborted_user_data = NULL; if (request) { if (request->host_uri != NULL) { @@ -708,6 +715,11 @@ API int http_transaction_destroy(http_transaction_h http_transaction) _remove_transaction_from_list(transaction); + transaction->session = NULL; + transaction->request = NULL; + transaction->response = NULL; + transaction->header = NULL; + free(transaction); transaction = NULL; }