summaryrefslogtreecommitdiffstats
path: root/src/usr
diff options
context:
space:
mode:
authorMichael Brown2007-01-15 10:18:06 +0100
committerMichael Brown2007-01-15 10:18:06 +0100
commitafa752f5fbebf49fcd399f85d1db85ef29cefc03 (patch)
treeed9054fc05e71e45672066aaf9f1e1b507dd1b85 /src/usr
parentMust free http on the error path; nothing else will do it (diff)
downloadipxe-afa752f5fbebf49fcd399f85d1db85ef29cefc03.tar.gz
ipxe-afa752f5fbebf49fcd399f85d1db85ef29cefc03.tar.xz
ipxe-afa752f5fbebf49fcd399f85d1db85ef29cefc03.zip
Protocol's get() method no longer takes ownership of the URI. HTTP is the
exception rather than the rule; we may as well keep things clean for other protocols.
Diffstat (limited to 'src/usr')
-rw-r--r--src/usr/fetch.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/usr/fetch.c b/src/usr/fetch.c
index 9e3c2de6f..71304bb21 100644
--- a/src/usr/fetch.c
+++ b/src/usr/fetch.c
@@ -86,7 +86,6 @@ int fetch ( const char *uri_string, userptr_t *data, size_t *len ) {
async_init_orphan ( &async );
if ( ( rc = download ( uri, &buffer, &async ) ) != 0 )
goto err;
- uri = NULL;
async_wait ( &async, &rc, 1 );
if ( rc != 0 )
goto err;
@@ -98,7 +97,7 @@ int fetch ( const char *uri_string, userptr_t *data, size_t *len ) {
/* Release temporary resources. The ebuffer storage is now
* owned by our caller, so we don't free it.
*/
-
+ free_uri ( uri );
return 0;
err: