mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-20 11:19:56 +00:00
update examples
This commit is contained in:
1 parent
074ef5197b
commit
f5e2c68c8b
27 files changed
+166
-47
No files matched your search
@@ -22,7 +22,7 @@ bool web_load_settings(void *buf, size_t len) {
|
||||
} else {
|
||||
memcpy(buf, data.buf, len);
|
||||
}
|
||||
free((void *) data.buf);
|
||||
mg_free((void *) data.buf);
|
||||
return ok;
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ static void setfromjson(struct mg_str json, const char *jsonpath, char *buf,
|
||||
size_t len) {
|
||||
char *val = mg_json_get_str(json, jsonpath);
|
||||
if (val != NULL) mg_snprintf(buf, len, "%s", val);
|
||||
free(val);
|
||||
mg_free(val);
|
||||
}
|
||||
|
||||
static void handle_settings_set(struct mg_connection *c, struct mg_str body) {
|
||||
@@ -159,7 +159,7 @@ static struct mg_connection *start_modbus_request(struct mg_mgr *mgr,
|
||||
cd->id = cid; // Store parent connection ID
|
||||
cd->expiration_time = mg_millis() + timeout;
|
||||
}
|
||||
free(url);
|
||||
mg_free(url);
|
||||
return c;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user