diff options
| author | Xavier Del Campo Romero <xavi92@disroot.org> | 2026-02-27 11:52:43 +0100 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi92@disroot.org> | 2026-02-27 15:29:04 +0100 |
| commit | fca0679e438e1cf8a3db9047f57d3b2363ab417e (patch) | |
| tree | 1de2b2e2115609e29007c104840e85193075e0da | |
| parent | 469410001bf283b658515391514d4c2077731d04 (diff) | |
http.c: Ensure valid object on freelocale(3)
According to POSIX.1-2008, the behaviour is undefined if freelocale(3)
is called with an invalid object. [1]
[1]: https://pubs.opengroup.org/onlinepubs/9699919799/functions/freelocale.html
| -rw-r--r-- | http.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -2780,7 +2780,9 @@ static int append_expire(struct dynstr *const d, const struct tm *const exp) ret = 0; end: - freelocale(l); + if (l != (locale_t)0) + freelocale(l); + return ret; } |
