Skip to content

Commit dda3a8b

Browse files
committed
iiod: iiod-serial: Fix memory leak
In the function start_serial_daemon, the "dev" variable was never freed when the thread was successfully created. Signed-off-by: Paul Cercueil <[email protected]>
1 parent 0152a9a commit dda3a8b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

iiod/serial.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,8 @@ int start_serial_daemon(struct iio_context *ctx, const char *uart_params,
262262
if (err)
263263
goto err_close_fd;
264264

265+
free(dev);
266+
265267
return 0;
266268

267269
err_close_fd:

0 commit comments

Comments
 (0)