Bug fix: assign NULL after releasing memory 41/104241/2 accepted/tizen/3.0/common/20161216.123259 accepted/tizen/3.0/mobile/20161216.014959 accepted/tizen/3.0/wearable/20161216.015039 submit/tizen_3.0/20161213.104012 submit/tizen_3.0/20161215.015242 submit/tizen_3.0/20161215.061842
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 01:54:10 +0000 (10:54 +0900)
Change-Id: I44c679359ccfdc3996cb0af2d14a75e40cdc9dc3
Signed-off-by: Seonah Moon <seonah1.moon@samsung.com>
packaging/capi-network-http.spec
src/http_transaction.c

index 284090755d0e3954afc32ec5225061201679abb0..eae907de2e73661c363b2989498c817b30910336 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 40485087a3687136e3273800d9a05b12f73241dd..f2b4fcf7dc5f3fed30247b466965b783c86b84f2 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;
        }