From c7b69ac793b7704c09560eb6850e4ec2bd66e575 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Tue, 25 Feb 2014 14:03:40 +0000 Subject: [params] Use reference counters for form parameter lists Signed-off-by: Michael Brown --- src/core/uri.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/core/uri.c') diff --git a/src/core/uri.c b/src/core/uri.c index bc55e4d8c..499fb9750 100644 --- a/src/core/uri.c +++ b/src/core/uri.c @@ -72,8 +72,7 @@ static void dump_uri ( struct uri *uri ) { static void free_uri ( struct refcnt *refcnt ) { struct uri *uri = container_of ( refcnt, struct uri, refcnt ); - if ( uri->params ) - destroy_parameters ( uri->params ); + params_put ( uri->params ); free ( uri ); } @@ -89,6 +88,7 @@ static void free_uri ( struct refcnt *refcnt ) { */ struct uri * parse_uri ( const char *uri_string ) { struct uri *uri; + struct parameters *params; char *raw; char *tmp; char *path; @@ -111,9 +111,9 @@ struct uri * parse_uri ( const char *uri_string ) { if ( ( tmp = strstr ( raw, "##params" ) ) ) { *tmp = '\0'; tmp += 8 /* "##params" */; - uri->params = find_parameters ( *tmp ? ( tmp + 1 ) : NULL ); - if ( uri->params ) { - claim_parameters ( uri->params ); + params = find_parameters ( *tmp ? ( tmp + 1 ) : NULL ); + if ( params ) { + uri->params = claim_parameters ( params ); } else { /* Ignore non-existent submission blocks */ } -- cgit v1.2.3-55-g7522