Bug fix: assign NULL after releasing memory 44/104244/1 accepted/tizen/common/20161213.164843 accepted/tizen/mobile/20161214.015556 accepted/tizen/wearable/20161214.015601 submit/tizen/20161213.104115
authorSeonah Moon <seonah1.moon@samsung.com>
Tue, 13 Dec 2016 01:50:12 +0000 (10:50 +0900)
committerSeonah Moon <seonah1.moon@samsung.com>
Tue, 13 Dec 2016 02:00:39 +0000 (11:00 +0900)
Change-Id: I44c679359ccfdc3996cb0af2d14a75e40cdc9dc3
Signed-off-by: Seonah Moon <seonah1.moon@samsung.com>
packaging/capi-network-http.spec
src/http_transaction.c

index 2840907..eae907d 100644 (file)
@@ -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
index 4048508..f2b4fcf 100644 (file)
@@ -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;
        }