Skip to content

Commit 1c6d336

Browse files
committed
fix memory leak in handling of service routers
1 parent 71ffeb4 commit 1c6d336

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

library/bind.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,9 @@ static void list_routers_cb(ziti_service_routers *srv_routers, const ziti_error
268268
CONN_LOG(DEBUG, "%s/%s", er->name, er->protocols.tls);
269269
model_list_append(&conn->server.routers, er);
270270
}
271+
FREE(srv_routers->routers); // router objects moved to the list
271272
}
272-
free(srv_routers);
273+
free_ziti_service_routers_ptr(srv_routers);
273274

274275
if (conn->server.token != NULL) {
275276
process_bindings(conn);

0 commit comments

Comments
 (0)