mirror of
https://github.com/emqx/neuron.git
synced 2026-10-26 20:09:48 +08:00
Merge pull request #1282 from lixiumei123/main
fix(dlt645-1997):crash when close the driver
This commit is contained in:
@@ -74,11 +74,11 @@ static neu_plugin_t *driver_open(void)
|
||||
|
||||
static int driver_close(neu_plugin_t *plugin)
|
||||
{
|
||||
free(plugin);
|
||||
|
||||
plog_notice(plugin, "close and free `%s` plugin success",
|
||||
plugin->common.name);
|
||||
|
||||
free(plugin);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -165,8 +165,9 @@ static int driver_write(neu_plugin_t *plugin, void *req, neu_datatag_t *tag,
|
||||
{
|
||||
int ret = file_write(plugin, req, tag, value);
|
||||
|
||||
plog_notice(plugin, "write response, ret: %d, tag_name: %s, type: %d", ret,
|
||||
tag->name, tag->type);
|
||||
plog_notice(plugin,
|
||||
"write response, ret: %d, tag_name: %s, type: %d, address: %s",
|
||||
ret, tag->name, tag->type, tag->address);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user