diff options
| author | 2022-09-22 17:44:23 +0200 | |
|---|---|---|
| committer | 2022-09-22 17:44:23 +0200 | |
| commit | 7a60c71744f94edc66994537fddafaf0db594fb5 (patch) | |
| tree | 2ed951c75f08ffd3c1c30e02347536ae68dd975f /httpd.c | |
| parent | Renamed enqueue() to enqueue_output(). (diff) | |
| download | snac2-7a60c71744f94edc66994537fddafaf0db594fb5.tar.gz snac2-7a60c71744f94edc66994537fddafaf0db594fb5.tar.xz snac2-7a60c71744f94edc66994537fddafaf0db594fb5.zip | |
Fixed memleak in greeting.
Diffstat (limited to 'httpd.c')
| -rw-r--r-- | httpd.c | 3 |
1 files changed, 2 insertions, 1 deletions
| @@ -41,6 +41,7 @@ void server_get_handler(d_char *req, char *q_path, int *status, | |||
| 41 | xs *list = user_list(); | 41 | xs *list = user_list(); |
| 42 | char *p, *uid; | 42 | char *p, *uid; |
| 43 | xs *ul = xs_str_new("<ul class=\"snac-user-list\">\n"); | 43 | xs *ul = xs_str_new("<ul class=\"snac-user-list\">\n"); |
| 44 | xs *os = s; | ||
| 44 | 45 | ||
| 45 | p = list; | 46 | p = list; |
| 46 | while (xs_list_iter(&p, &uid)) { | 47 | while (xs_list_iter(&p, &uid)) { |
| @@ -60,7 +61,7 @@ void server_get_handler(d_char *req, char *q_path, int *status, | |||
| 60 | 61 | ||
| 61 | ul = xs_str_cat(ul, "</ul>\n"); | 62 | ul = xs_str_cat(ul, "</ul>\n"); |
| 62 | 63 | ||
| 63 | s = xs_replace(s, "%userlist%", ul); | 64 | s = xs_replace(os, "%userlist%", ul); |
| 64 | } | 65 | } |
| 65 | 66 | ||
| 66 | *body = s; | 67 | *body = s; |