* [PATCH] opensm: fixed getline pointer allocation free in osm_console_io
@ 2011-02-03 11:53 Alex Netes
0 siblings, 0 replies; only message in thread
From: Alex Netes @ 2011-02-03 11:53 UTC (permalink / raw)
To: linux-rdma-u79uwXL29TY76Z2rM5mHXA
p_line allocated by getline() isn't being freed at the end.
Signed-off-by: Alex Netes <alexne-smomgflXvOZWk0Htik3J/w@public.gmane.org>
---
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 majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2011-02-03 11:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-03 11:53 [PATCH] opensm: fixed getline pointer allocation free in osm_console_io Alex Netes
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox