Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
rdma-mwe
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Titouan Soulard
rdma-mwe
Commits
1c956bef
Commit
1c956bef
authored
Feb 19, 2024
by
Titouan Soulard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libcapulet: avoid memory leak
parent
6975631b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
libcapulet/net_udp.c
libcapulet/net_udp.c
+3
-1
No files found.
libcapulet/net_udp.c
View file @
1c956bef
...
...
@@ -156,7 +156,9 @@ bool capulet_net_udp_query_mr(int server_socket, struct addrinfo *server_infos,
int
result
;
uint8_t
receive_buffer
[
buffer_size
];
memcpy
((
void
*
)
mr_query_packet
.
name
,
(
void
*
)
name
,
16
);
// Ensure string will always be NUL-terminated
strncpy
((
void
*
)
mr_query_packet
.
name
,
(
void
*
)
name
,
15
);
mr_query_packet
.
name
[
15
]
=
'\0'
;
result
=
sendto
(
server_socket
,
(
void
*
)
&
mr_query_packet
,
sizeof
(
struct
CapuletNetUdpMrQueryPacket
),
0
,
server_infos
->
ai_addr
,
server_infos
->
ai_addrlen
);
if
(
result
==
-
1
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment