From patchwork Wed May 13 05:52:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?6ZmI5paM?= X-Patchwork-Id: 471684 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 2081D140D1A for ; Wed, 13 May 2015 15:52:40 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=126.com header.i=@126.com header.b=ItxptRrA; dkim-atps=neutral Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id C920A280ADB; Wed, 13 May 2015 07:51:15 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,FREEMAIL_FROM, HTML_MESSAGE,T_DKIM_INVALID,T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id E231E2800EB for ; Wed, 13 May 2015 07:51:11 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 CL_IP_EQ_HELO_IP=-2 (check from: .126. - helo: .m15-31.126. - helo-domain: .126.) FROM/MX_MATCHES_HELO(DOMAIN)=-2; rate: -8.5 Received: from m15-31.126.com (m15-31.126.com [220.181.15.31]) by arrakis.dune.hu (Postfix) with ESMTP for ; Wed, 13 May 2015 07:51:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=126.com; s=s110527; h=Date:From:Subject:MIME-Version:Message-ID; bh=xOUca gICvG+155GKc8voe2TD2zvp3E50PWqYUD3tCIA=; b=ItxptRrAAP20oAn8yzoje v0Y4q+ldXq+fe0kWuNwYPL6MOAzs8bySM7Bq+ZdPst2zlxRWa1H8Cy3QReOl9+6+ 0wFVx/Djq6LmkWTQxrfcUf+VO7VMYZi9kx6xtST6YfRa6xfXsB5s3xRlzYDDqbVM K8Rgy5q3NNi0oPGod+Ur/k= Received: from ewolfok$126.com ( [110.184.150.14] ) by ajax-webmail-wmsvr31 (Coremail) ; Wed, 13 May 2015 13:52:22 +0800 (CST) X-Originating-IP: [110.184.150.14] Date: Wed, 13 May 2015 13:52:22 +0800 (CST) From: =?GBK?B?s8Kx8w==?= To: nbd@openwrt.org X-Priority: 3 X-Mailer: Coremail Webmail Server Version SP_ntes V3.5 build 20150119(59087.7062) Copyright (c) 2002-2015 www.mailtech.cn 126com X-CM-CTRLDATA: tHYb8GZvb3Rlcl9odG09NDcxOjgx MIME-Version: 1.0 Message-ID: <77c8fd05.9423.14d4bd4bd43.Coremail.ewolfok@126.com> X-CM-TRANSID: H8qowADn7TWY5lJVnWL2AA--.739W X-CM-SenderInfo: hhzrzwlrn6ij2wof0z/1tbi2xj4MVR0XVIjLwAAsp X-Coremail-Antispam: 1U5529EdanIXcx71UUUUU7vcSsGvfC2KfnxnUU== Cc: openwrt-devel@lists.openwrt.org Subject: [OpenWrt-Devel] [PATCH] [package] ubus: fix memory leak problem X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" HI, all this is a patch try to fix libubus-lua's memory leak problem Best regards Signed-off-by:Chen Bin --- a/lua/ubus.c +++ b/lua/ubus.c @@ -666,6 +666,7 @@ ubus_lua__gc(lua_State *L) { struct ubus_lua_connection *c = luaL_checkudata(L, 1, METANAME); + blob_buf_free(&c->buf); if (c->ctx != NULL) { ubus_free(c->ctx);