From patchwork Thu Feb 3 11:53:55 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Netes X-Patchwork-Id: 529171 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p13Brxcb031654 for ; Thu, 3 Feb 2011 11:53:59 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932069Ab1BCLx7 (ORCPT ); Thu, 3 Feb 2011 06:53:59 -0500 Received: from fwil.voltaire.com ([193.47.165.2]:15036 "EHLO Exil2010.voltaire.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932065Ab1BCLx6 (ORCPT ); Thu, 3 Feb 2011 06:53:58 -0500 Received: from localhost (172.25.6.157) by Exil2010.voltaire.com (172.25.0.11) with Microsoft SMTP Server (TLS) id 14.1.270.1; Thu, 3 Feb 2011 13:53:55 +0200 Date: Thu, 3 Feb 2011 13:53:55 +0200 From: Alex Netes To: Subject: [PATCH] opensm: fixed getline pointer allocation free in osm_console_io Message-ID: <20110203115355.GA5246@calypso.voltaire.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Originating-IP: [172.25.6.157] Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 03 Feb 2011 11:53:59 +0000 (UTC) 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;