Skip to content

Commit

Permalink
fsdev: fix memory leak in main()
Browse files Browse the repository at this point in the history
@rpath and @sock_name are not freed and leaked.

[groug, not really leaked since the program exits just after that. But it
 is always good practice to free allocated memory]

Signed-off-by: Zhipeng Lu <lu.zhipeng@zte.com.cn>
Signed-off-by: Greg Kurz <groug@kaod.org>
  • Loading branch information
ZhiPeng Lu authored and gkurz committed Sep 5, 2017
1 parent 403a905 commit 3c08f4a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fsdev/virtfs-proxy-helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 3c08f4a

Please sign in to comment.