mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-22 21:35:04 +00:00
Fixed memleak in greeting.
This commit is contained in:
parent
b8436ddfde
commit
7a60c71744
1 changed files with 2 additions and 1 deletions
3
httpd.c
3
httpd.c
|
@ -41,6 +41,7 @@ void server_get_handler(d_char *req, char *q_path, int *status,
|
||||||
xs *list = user_list();
|
xs *list = user_list();
|
||||||
char *p, *uid;
|
char *p, *uid;
|
||||||
xs *ul = xs_str_new("<ul class=\"snac-user-list\">\n");
|
xs *ul = xs_str_new("<ul class=\"snac-user-list\">\n");
|
||||||
|
xs *os = s;
|
||||||
|
|
||||||
p = list;
|
p = list;
|
||||||
while (xs_list_iter(&p, &uid)) {
|
while (xs_list_iter(&p, &uid)) {
|
||||||
|
@ -60,7 +61,7 @@ void server_get_handler(d_char *req, char *q_path, int *status,
|
||||||
|
|
||||||
ul = xs_str_cat(ul, "</ul>\n");
|
ul = xs_str_cat(ul, "</ul>\n");
|
||||||
|
|
||||||
s = xs_replace(s, "%userlist%", ul);
|
s = xs_replace(os, "%userlist%", ul);
|
||||||
}
|
}
|
||||||
|
|
||||||
*body = s;
|
*body = s;
|
||||||
|
|
Loading…
Reference in a new issue