fsdev: fix memory leak in main()
PATCH 1/1 fsdev: fix memory leak in main()
@rpath and @ sock_name are not freed and leaked.
Signed-off-by Zhipeng Lu [email protected]
--- fsdev/virtfs-proxy-helper.c | 2 ++ 1 file changed, 2 insertions(+)
fsdev/virtfs-proxy-helper.c +2 -0
@@ -1162,6 +1162,8 @@ int main(int argc, char **argv)process_requests (sock); error: +g_free (rpath); +g_free (sock_name);do_log (LOG_INFO ,"Done\n" );closelog ();return 0 ;
Signature · 1 line
1.8.3.1
Quoted 2 lines · On Thu, 27 Jul 2017 08:31:42 +0800 ZhiPeng Lu <[email protected]> wrote:
@rpath and @
sock_nameare not freed and leaked.
The leak is harmless since the process is expected to terminate when main() returns. So, even if I fully agree that we should always take care of allocated memory, I will push it to my 9p-next branch and wait for 2.11 before pushing it upstream.
Quoted 18 lines
Signed-off-by Zhipeng Lu [email protected]--- fsdev/virtfs-proxy-helper.c | 2 ++ 1 file changed, 2 insertions(+)fsdev/virtfs-proxy-helper.c +2
-0@@ -1162,6 +1162,8 @@ int main(int argc, char **argv)process_requests (sock); error: +g_free (rpath); +g_free (sock_name);do_log (LOG_INFO ,"Done\n" );closelog ();return 0 ;