Skip to content

Commit

Permalink
fix memory leak
Browse files Browse the repository at this point in the history
  • Loading branch information
blackav committed Dec 29, 2023
1 parent c4a9ebe commit 1f785c6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/new_server_html_5.c
Original file line number Diff line number Diff line change
Expand Up @@ -3935,7 +3935,9 @@ ns_register_pages(FILE *fout, struct http_request_info *phr)
unsigned char hid_buf[1024];
int cookie_locale_id = -1;

phr->log_f = open_memstream(&phr->log_t, &phr->log_z);
if (!phr->log_f) {
phr->log_f = open_memstream(&phr->log_t, &phr->log_z);
}

if (phr->action == NEW_SRV_ACTION_CHANGE_LANGUAGE)
return change_locale(fout, phr);
Expand Down

0 comments on commit 1f785c6

Please sign in to comment.