From 2c6ceac486aca898110ec03987defd54c619b06b Mon Sep 17 00:00:00 2001 From: Julien BLACHE Date: Fri, 29 Jan 2010 22:33:32 +0100 Subject: [PATCH] Rework code flow in httpd_gen_cb() --- src/httpd.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/httpd.c b/src/httpd.c index f72afed6..48cbffef 100644 --- a/src/httpd.c +++ b/src/httpd.c @@ -812,15 +812,13 @@ httpd_gen_cb(struct evhttp_request *req, void *arg) { rsp_request(req); - free(uri); - return; + goto out; } else if (daap_is_request(req, uri)) { daap_request(req); - free(uri); - return; + goto out; } DPRINTF(E_DBG, L_HTTPD, "HTTP request: %s\n", uri); @@ -828,6 +826,7 @@ httpd_gen_cb(struct evhttp_request *req, void *arg) /* Serve web interface files */ serve_file(req, uri); + out: free(uri); }