Skip to content

Commit

Permalink
Fix serial open memory leak (#866)
Browse files Browse the repository at this point in the history
  • Loading branch information
sashacmc authored Jan 29, 2025
1 parent 10b262d commit acaed6e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/link/unicast/serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ z_result_t _z_f_link_open_serial(_z_link_t *self) {
} else {
ret = _z_open_serial_from_dev(&self->_socket._serial._sock, address, baudrate);
}
z_free(address);

return ret;
}
Expand All @@ -100,6 +101,7 @@ z_result_t _z_f_link_listen_serial(_z_link_t *self) {
} else {
ret = _z_listen_serial_from_dev(&self->_socket._serial._sock, address, baudrate);
}
z_free(address);

return ret;
}
Expand Down

0 comments on commit acaed6e

Please sign in to comment.