aboutsummaryrefslogtreecommitdiffstats
path: root/lib/http_client.c
diff options
context:
space:
mode:
authorSven Moritz Hallberg <pesco@khjk.org>2009-03-12 20:33:28 +0100
committerSven Moritz Hallberg <pesco@khjk.org>2009-03-12 20:33:28 +0100
commit673a54c5a78afd1dd41b4cd8811df5ab65042583 (patch)
treebffaa961139ac2be20f0875ef0ed37c87d6b18a9 /lib/http_client.c
parent823de9d44f262ea2364ac8ec6a1e18e0f7dab658 (diff)
parent9e768da723b4a770967efa0d4dcaf58ccef8917f (diff)
pretty blind try at merging in the latest trunk
Diffstat (limited to 'lib/http_client.c')
-rw-r--r--lib/http_client.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/lib/http_client.c b/lib/http_client.c
index b00fcf98..aae5645b 100644
--- a/lib/http_client.c
+++ b/lib/http_client.c
@@ -58,8 +58,8 @@ void *http_dorequest( char *host, int port, int ssl, char *request, http_input_f
if( error )
{
- g_free( req );
- return( NULL );
+ http_free( req );
+ return NULL;
}
req->func = func;
@@ -159,10 +159,7 @@ error:
req->status_string = g_strdup( "Error while writing HTTP request" );
req->func( req );
-
- g_free( req->request );
- g_free( req );
-
+ http_free( req );
return FALSE;
}
@@ -443,11 +440,15 @@ cleanup:
closesocket( req->fd );
req->func( req );
-
+ http_free( req );
+ return FALSE;
+}
+
+void http_free( struct http_request *req )
+{
g_free( req->request );
g_free( req->reply_headers );
g_free( req->status_string );
g_free( req );
-
- return FALSE;
}
+