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:
Joachim Wiberg
2021-03-29 23:20:00 +02:00
parent bda4da71a6
commit 9e6e653c57
+2
View File
@@ -250,6 +250,8 @@ static void pidfile_init(void *arg)
if (pidfile_add_path(&iw_pidfile, path))
iwatch_exit(&iw_pidfile);
free(path);
}
/*