From patchwork Tue Sep 7 15:05:36 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yevgeny Kliteynik X-Patchwork-Id: 161161 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 o87F0vGR032530 for ; Tue, 7 Sep 2010 15:05:40 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757108Ab0IGPFk (ORCPT ); Tue, 7 Sep 2010 11:05:40 -0400 Received: from mail.mellanox.co.il ([194.90.237.43]:60232 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756757Ab0IGPFj (ORCPT ); Tue, 7 Sep 2010 11:05:39 -0400 Received: from Internal Mail-Server by MTLPINE2 (envelope-from kliteyn@mellanox.co.il) with SMTP; 7 Sep 2010 18:04:58 +0300 Received: from [10.4.1.29] (10.4.1.29) by mtlmail01.mtl.com (10.0.8.12) with Microsoft SMTP Server id 8.2.254.0; Tue, 7 Sep 2010 18:05:36 +0300 Message-ID: <4C8654C0.7020208@mellanox.co.il> Date: Tue, 7 Sep 2010 18:05:36 +0300 From: Yevgeny Kliteynik Reply-To: kliteyn@dev.mellanox.co.il User-Agent: Thunderbird 1.5.0.5 (X11/20060719) MIME-Version: 1.0 To: Sasha Khapyorsky , Linux RDMA Subject: [PATCH] opensm/osm_db_files.c: fix small memory leak 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.3 (demeter1.kernel.org [140.211.167.41]); Tue, 07 Sep 2010 15:05:40 +0000 (UTC) diff --git a/opensm/opensm/osm_db_files.c b/opensm/opensm/osm_db_files.c index c475004..603bcf2 100644 --- a/opensm/opensm/osm_db_files.c +++ b/opensm/opensm/osm_db_files.c @@ -175,6 +175,7 @@ int osm_db_init(IN osm_db_t * p_db, IN osm_log_t * p_log) OSM_LOG(p_log, OSM_LOG_ERROR, "ERR 6101: " "Failed to create the db directory:%s\n", p_db_imp->db_dir_name); + free(p_db_imp); OSM_LOG_EXIT(p_log); return 1; }