libustconsumer: Fix a fd leak of the pipe_fd
authorNils Carlson <nils.carlson@ericsson.com>
Mon, 7 Mar 2011 16:20:34 +0000 (17:20 +0100)
committerNils Carlson <nils.carlson@ericsson.com>
Mon, 7 Mar 2011 16:22:11 +0000 (17:22 +0100)
libustconsumer wasn't properly closing pipe_fds sent by
libust. Make it do so.

Signed-off-by: Nils Carlson <nils.carlson@ericsson.com>
libustconsumer/libustconsumer.c

index ef54fe807352bf5be8242b8bf0e205fe1aaa26c4..8eb4424be81099d4113fe00a8d780b1e2f5edfce 100644 (file)
@@ -426,6 +426,11 @@ static void destroy_buffer(struct ustconsumer_callbacks *callbacks,
 {
        int result;
 
+       result = close(buf->pipe_fd);
+       if(result == -1) {
+               WARN("problem closing the pipe fd");
+       }
+
        result = close(buf->app_sock);
        if(result == -1) {
                WARN("problem calling ustcomm_close_app");
This page took 0.023762 seconds and 4 git commands to generate.