Browse code

http_client: move to next field before freeing item in fixup function

Daniel-Constantin Mierla authored on 30/06/2017 12:15:55
Showing 1 changed files
... ...
@@ -679,6 +679,7 @@ done:
679 679
 	while (raw_conn_list != NULL)
680 680
 	{
681 681
 		raw_cc = raw_conn_list;
682
+		raw_conn_list = raw_conn_list->next;
682 683
 		if (raw_cc->name.s) pkg_free(raw_cc->name.s);
683 684
 		if (raw_cc->url.s) pkg_free(raw_cc->url.s);
684 685
 		if (raw_cc->username.s) pkg_free(raw_cc->username.s);
... ...
@@ -690,7 +691,6 @@ done:
690 691
 		if (raw_cc->ciphersuites.s) pkg_free(raw_cc->ciphersuites.s);
691 692
 		if (raw_cc->http_proxy.s) pkg_free(raw_cc->http_proxy.s);
692 693
 		pkg_free(raw_cc);
693
-		raw_conn_list = raw_conn_list->next;
694 694
 	}
695 695
 	return ret;
696 696
 }