Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions net/local/local_conn.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,8 +338,7 @@ void local_free(FAR struct local_conn_s *conn)
{
if (conn->lc_cfps[i])
{
file_close(conn->lc_cfps[i]);
kmm_free(conn->lc_cfps[i]);
file_put(conn->lc_cfps[i]);
conn->lc_cfps[i] = NULL;
}
}
Expand Down
2 changes: 1 addition & 1 deletion net/local/local_recvmsg.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ static void local_recvctl(FAR struct local_conn_s *conn,
{
if (peer->lc_cfpcount)
{
memmove(peer->lc_cfps[0], peer->lc_cfps[i],
memmove(&peer->lc_cfps[0], &peer->lc_cfps[i],
sizeof(FAR void *) * peer->lc_cfpcount);
}
}
Expand Down
5 changes: 5 additions & 0 deletions net/local/local_sendmsg.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ static void local_freectl(FAR struct local_conn_s *conn, int count)
{
FAR struct local_conn_s *peer = conn->lc_peer;

if (peer == NULL)
{
peer = conn;
}

while (count-- > 0)
{
file_put(peer->lc_cfps[--peer->lc_cfpcount]);
Expand Down
Loading