Skip to content

Commit

Permalink
[uri] Special case NULL in churi()
Browse files Browse the repository at this point in the history
resolve_uri() doesn't (and probably shouldn't) handle NULL relative_uri.

Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com>
Reviewed-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Marty Connor <mdc@etherboot.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
  • Loading branch information
pjaroszynski authored and mcb30 committed Apr 25, 2010
1 parent 4cb0bfe commit 61206c2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/core/cwuri.c
Expand Up @@ -38,9 +38,11 @@ struct uri *cwuri = NULL;
* @v uri New working URI, or NULL
*/
void churi ( struct uri *uri ) {
struct uri *new_uri;
struct uri *new_uri = NULL;

if ( uri )
new_uri = resolve_uri ( cwuri, uri );

new_uri = resolve_uri ( cwuri, uri );
uri_put ( cwuri );
cwuri = new_uri;
}

0 comments on commit 61206c2

Please sign in to comment.