aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/modbuslog.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/modbuslog.c b/src/modbuslog.c
index da03a11..f179a0b 100644
--- a/src/modbuslog.c
+++ b/src/modbuslog.c
@@ -299,6 +299,8 @@ int main(int argc, char *argv[]) {
if (rc == -1){
// retried, but still no luck
+ modbus_close(ctx);
+ modbus_free(ctx);
continue;
}