diff --git a/fs/v9fs/client.c b/fs/v9fs/client.c index 8b20f5e8333..8f2257b9a3b 100644 --- a/fs/v9fs/client.c +++ b/fs/v9fs/client.c @@ -1638,6 +1638,7 @@ int v9fs_client_init(FAR struct v9fs_client_s *client, while (*options != '\0') { FAR const char *sep = strchr(options, ','); + length = sep ? sep - options : strlen(options); if (strncmp(options, "uname=", 6) == 0) @@ -1819,5 +1820,6 @@ int v9fs_fid_get(FAR struct v9fs_client_s *client, uint32_t fid) ssize_t v9fs_parse_size(FAR const void *buffer) { FAR const struct v9fs_header_s *ptr = buffer; + return ptr->size; } diff --git a/fs/v9fs/virtio_9p.c b/fs/v9fs/virtio_9p.c index f9f97350fe9..c806c22a016 100644 --- a/fs/v9fs/virtio_9p.c +++ b/fs/v9fs/virtio_9p.c @@ -150,6 +150,7 @@ static void virtio_9p_destroy(FAR struct v9fs_transport_s *transport) { FAR struct virtio_9p_priv_s *priv = container_of(transport, struct virtio_9p_priv_s, transport); + virtio_unregister_driver(&priv->vdrv); fs_heap_free(priv); }