no need to duplicate BSTRs just for getting a StrBuf; we can use sbstr here.
authorWilfried Goesgens <dothebart@citadel.org>
Sun, 8 Dec 2013 15:04:09 +0000 (16:04 +0100)
committerWilfried Goesgens <dothebart@citadel.org>
Sun, 8 Dec 2013 15:04:09 +0000 (16:04 +0100)
webcit/webcit.c

index 89de551eb0e7058c7e751daec7398708eaa38b50..dd0043d29dd0794af9f2cb43d80e5fe760413dcb 100644 (file)
@@ -831,9 +831,7 @@ void display_default_landing_page(void) {
 
                if (havebstr("go")) {
                        syslog(LOG_DEBUG, "Explicit room selection: %s", bstr("go"));
-                       StrBuf *teh_room = NewStrBufPlain(bstr("go"), strlen(bstr("go")));
-                       smart_goto(teh_room);
-                       FreeStrBuf(&teh_room);
+                       smart_goto(sbstr("go"));
                }
                else if (default_landing_page) {
                        http_redirect(default_landing_page);