fix http parser and config

This commit is contained in:
2025-05-08 16:58:42 +02:00
parent 8e880f59be
commit 8ff2bb608c
11 changed files with 50 additions and 35 deletions

View File

@@ -34,10 +34,16 @@ int main(void) {
cws_hashmap *str_hashmap = cws_hm_init(my_hash_fn, my_equal_fn, my_free_fn, my_free_fn);
char *key = strdup("test1");
char *value = strdup("value1");
if (key == NULL) {
CWS_LOG_ERROR("strdup() key");
if (key == NULL || value == NULL) {
CWS_LOG_ERROR("strdup()");
return 1;
}
char *value = strdup("value1");
if (value == NULL) {
CWS_LOG_ERROR("strdup() value");
free(key);
return 1;
}