loc = htsbuf_to_string(&hq);
htsbuf_queue_flush(&hq);
} else if (!external && tvheadend_webroot && location[0] == '/') {
- loc = alloca(strlen(location) + strlen(tvheadend_webroot) + 1);
+ loc = malloc(strlen(location) + strlen(tvheadend_webroot) + 1);
strcpy((char *)loc, tvheadend_webroot);
strcat((char *)loc, location);
}
loc, loc);
http_send_reply(hc, HTTP_STATUS_FOUND, "text/html", NULL, loc, 0);
+
+ if (loc != location)
+ free(loc);
}