p_line allocated by getline() isn't being freed at the end.

Signed-off-by: Alex Netes <[email protected]>
---
 opensm/opensm/osm_console_io.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/opensm/opensm/osm_console_io.c b/opensm/opensm/osm_console_io.c
index 0a15313..1205a5f 100644
--- a/opensm/opensm/osm_console_io.c
+++ b/opensm/opensm/osm_console_io.c
@@ -130,8 +130,10 @@ int cio_open(osm_console_t * p_oct, int new_fd, osm_log_t 
* p_log)
                                "Console connection aborted: %s (%s)\n",
                                p_oct->client_hn, p_oct->client_ip);
                        close(new_fd);
+                       free(p_line);
                        return -1;
                }
+               free(p_line);
        }
        p_oct->in_fd = new_fd;
        p_oct->out_fd = p_oct->in_fd;
-- 
1.7.3.4

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to