From patchwork Tue Dec 7 00:22:50 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arlin Davis X-Patchwork-Id: 380792 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 oB70MuJ0020452 for ; Tue, 7 Dec 2010 00:22:57 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752930Ab0LGAWz (ORCPT ); Mon, 6 Dec 2010 19:22:55 -0500 Received: from mga09.intel.com ([134.134.136.24]:65116 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750774Ab0LGAWz convert rfc822-to-8bit (ORCPT ); Mon, 6 Dec 2010 19:22:55 -0500 Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP; 06 Dec 2010 16:22:55 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.59,307,1288594800"; d="scan'208";a="684527751" Received: from orsmsx602.amr.corp.intel.com ([10.22.226.211]) by orsmga001.jf.intel.com with ESMTP; 06 Dec 2010 16:22:55 -0800 Received: from orsmsx606.amr.corp.intel.com (10.22.226.128) by orsmsx602.amr.corp.intel.com (10.22.226.211) with Microsoft SMTP Server (TLS) id 8.2.254.0; Mon, 6 Dec 2010 16:22:54 -0800 Received: from orsmsx506.amr.corp.intel.com ([10.22.226.44]) by orsmsx606.amr.corp.intel.com ([10.22.226.128]) with mapi; Mon, 6 Dec 2010 16:22:54 -0800 From: "Davis, Arlin R" To: linux-rdma , "ofw@lists.openfabrics.org" CC: "Smith, Stan" , "King, Perry E." Date: Mon, 6 Dec 2010 16:22:50 -0800 Subject: [PATCH] libdat v2.0: memory leak in static registration during parsing Thread-Topic: [PATCH] libdat v2.0: memory leak in static registration during parsing Thread-Index: AcuVpOHybmwJIfhtS+Cb/0oVEqkozg== Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 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 Dec 2010 00:22:57 +0000 (UTC) diff --git a/dat/udat/udat_sr_parser.c b/dat/udat/udat_sr_parser.c index 3b5caef..1d5f0d8 100644 --- a/dat/udat/udat_sr_parser.c +++ b/dat/udat/udat_sr_parser.c @@ -492,6 +492,12 @@ DAT_RETURN dat_sr_parse_entry(DAT_OS_FILE * file) 1)); } + if (NULL != entry.platform_params) { + dat_os_free(entry.platform_params, + sizeof(char) * + (dat_os_strlen(entry.platform_params) + 1)); + } + return status; }