mirror of
https://github.com/troglobit/finit.git
synced 2026-09-30 13:02:37 +07:00
plugins: pidfile: fix subtle memory leak
Since the introduction of the iwatch framework we can now safely free the memory allocated by realpath() and prevent leaks in a more elegant way than before. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
@@ -250,6 +250,8 @@ static void pidfile_init(void *arg)
|
||||
|
||||
if (pidfile_add_path(&iw_pidfile, path))
|
||||
iwatch_exit(&iw_pidfile);
|
||||
|
||||
free(path);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user