From patchwork Mon Oct 2 14:13:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Storm, Christian" X-Patchwork-Id: 820511 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:400c:c0c::23c; helo=mail-wr0-x23c.google.com; envelope-from=swupdate+bncbdd6bwv65qpbbteuzhhakgqeixbt42y@googlegroups.com; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.b="lY5vCjnZ"; dkim-atps=neutral Received: from mail-wr0-x23c.google.com (mail-wr0-x23c.google.com [IPv6:2a00:1450:400c:c0c::23c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3y5PNw5wCVz9t6m for ; Tue, 3 Oct 2017 01:16:47 +1100 (AEDT) Received: by mail-wr0-x23c.google.com with SMTP id k15sf3219938wrc.1 for ; Mon, 02 Oct 2017 07:16:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1506953805; cv=pass; d=google.com; s=arc-20160816; b=Hvtcf7k/67Kme1A2aOjpBvPMpF92Jlpo+yO4gKNTuNl2rKjkgBLuHGs8dS8KOGPnyl Jt1T+IMeyTxaJtb7x0MLuuzsR6XOpHhiaZhrnL2OIB1j2xqyBRNhIh0EmHXmnDj0NU5V /1vRmQ7tQvIlokAsfdKxAAtZOZpJv5I/9w+TgQYcnftypRJLoLEvRJxkSA3XOlfVS4vd JSiR09uecS9gYDNPW+G23rXPRTfWG5GMiG3uyro60BNv+hVh4h9PCN2Pxra+CzGPwION 9LkqmyLGGI5LUYIGjKsVMnC8goXlwqGk6jx+0YfI27KOsLqV8ghtfD7/p0BrJ2ezNCEI vUFw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:message-id:date:subject:cc:to:from :arc-authentication-results:arc-message-signature:mime-version :sender:dkim-signature:arc-authentication-results; bh=qccUPlVAmcozI6dwIenAQ2sbFM66TJJoyb/TXul62yo=; b=R0EXR7gsiwWiPuVDfOMuP2xA+ueRk/CTkhu7uQZ9SM6qIFm5ryi8Grkv6crl3vGDfk BdauDWxZR4zJ5VkpRK4mCdGgKGrSFdbqlBwFldiHNaUu6ZgZ0Sbgx/nQsi+DXeprDXhM w0stbN6yJwQqQD9R/1MDO0Ao8rCv/RrpbvHszrAojU/P6PgTX2545rH0KTU7pvwULeEh /qiHrsmBwni+B1ZGNRJb2IK4JUqNtqfFRFl5RHxtNGaIYXAP9ma/iyovFIDA2taqtESV u2Amr52tUoz+46An3TAlsM0TJhmhGgWl0agQTE+RfdsXx5mSXguFYogxr3lFg8gFTVZq f3Xg== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=neutral (google.com: 192.35.17.28 is neither permitted nor denied by best guess record for domain of christian.storm@siemens.com) smtp.mailfrom=christian.storm@siemens.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:mime-version:from:to:cc:subject:date:message-id :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=qccUPlVAmcozI6dwIenAQ2sbFM66TJJoyb/TXul62yo=; b=lY5vCjnZ3nUw0RlX4UScwem1BB2ooQDd/zrv68xTFL6FE4n3g00r1NX8jlgZO9zIVQ /7fY/iojQTIcIOpX7dQkVsk91ktnSz059HSYkJnNPOvdn/mmIyomqxt9y0uz3pfb56CZ CDPacSMZg4cd8N5jWWrA2nzIx3Sr8xjMLd4MDYcFz5DtvETSv3r432PfGT0ktT67jYzY Fxub/Ilo7cp4h4xFsuNQ3hONdVQYAGtENXsuWfkK6gdvw//vL5aY6b3AVjfRFkStEmuw z9JebR0mtFillHzLus930zqWp5G9jYIahgqSQw9JIJ2OlC2mwwPO7ekYMEQmz4ezS3Em BJ3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:mime-version:from:to:cc:subject:date :message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=qccUPlVAmcozI6dwIenAQ2sbFM66TJJoyb/TXul62yo=; b=CypKdUgSuTHKU8H8GiYMgUeSCPdn5MY9KCwSvf+0jj9UMhlm9R6SxBtnhE/E1jPlKZ VCI3PCED5JX94rafPAiFgqkbuxBw4QNZi0KyEasTNThepvWO+eDJdNC5jnzkubtAFKHk cwofP0JiRpib/zoWNI7MMm9vs2dYKv/TQutsMXJSXIOmMJ3U4tBv+U07n6y4HO3RFnJ5 MOzZ74g4qLJOat58NHv0SFuoe2xlzjYewbX3W1/3w/TVAys6ov2rBAqEA8Sn3L30REDx jllRmRGdyV6CnJns+AQPR9wHwaAIUjjw/qYHpbEr4SFJPadUGiweGDm7AtHKBYiFcIkO iLWA== Sender: swupdate@googlegroups.com X-Gm-Message-State: AHPjjUh3nvHFKp2bGSsdqvKgkHmJOt/G1lTAcjQO6TagjJbnAyI+3bF/ YIytAj2giLy1lQLFnRyPAK0= X-Google-Smtp-Source: AOwi7QArjtUq4LAkZmdXtDeGGFJy+H+nIrZdkuY7eRVrcQtQOSL5KhowoELlsuvBTPCsbqRprJXTCQ== X-Received: by 10.28.20.147 with SMTP id 141mr45324wmu.10.1506953804992; Mon, 02 Oct 2017 07:16:44 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: swupdate@googlegroups.com Received: by 10.223.130.196 with SMTP id 62ls1152779wrc.5.gmail; Mon, 02 Oct 2017 07:16:44 -0700 (PDT) X-Received: by 10.28.131.208 with SMTP id f199mr1843932wmd.11.1506953804638; Mon, 02 Oct 2017 07:16:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506953804; cv=none; d=google.com; s=arc-20160816; b=jWBEl3LRqVN94ylpF4WnCz5OWVJZlD4azkydTFkbPBHxyZ0RP+za8Y6Nnoxok2XRot Tv3hsX0zk2Aa/Tvn0vQRBRrZchKEdbiMdMOpjNPnO4NGPWpmlnIB2Nk5nP4ynFr6BgOz +MLK0BwyLe02xpnnItdp4JL27+v+m05y7njYpXbhQ3Fxl3wNbbBYqcaw7vfd+D+5vFz3 CisLGGUB7Th53zBF7s8cj/PaV5JMOlMXHEIIHewMdzMVKXoqxZq821ziRCsqu+Pftdk4 xZY1DZpdnKKc3ccsfIrfbd/iyNHPwMO/AgjcqM9xUndAhKN4zoz+CpuvZ25PcPO/OCnO UDgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from:arc-authentication-results; bh=C6YQUj4kG8ZO1eUglM6TrT3R4H8dzoMqBjgLu/L4l8A=; b=rkusY7Xv7NylAmLRLczFdlsc7mlLWEZZ3vWpEKvlZGnpzIZI84W+Qjg3c/MCRRZ4Kl eqbm5sqzlbr8Gb8WczvyQhEFDYB73uAQdxE/Skkd31IlZrcbaUwerMUW0AaV8hfghIPN 81tBrkq74enQrdhWeGw8UPqXt186gcIY/tN648abEMWN7NqchHEjcI++oN34/wI9QvMY bt+7Z8erDXHeMysQEB6fEQYVO/2HgX/mGOKkFTsVfJqGmpjlTrqAa/sK0gvddd9ZGun+ 7US+gUmyscqYnF4XGT1gd6i2+zCvipq8JbIBpNT6kgB62B1s80nCMu26dJbw4TOYZo/A vpjQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 192.35.17.28 is neither permitted nor denied by best guess record for domain of christian.storm@siemens.com) smtp.mailfrom=christian.storm@siemens.com Received: from goliath.siemens.de (goliath.siemens.de. [192.35.17.28]) by gmr-mx.google.com with ESMTPS id m74si788533wma.0.2017.10.02.07.16.44 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 02 Oct 2017 07:16:44 -0700 (PDT) Received-SPF: neutral (google.com: 192.35.17.28 is neither permitted nor denied by best guess record for domain of christian.storm@siemens.com) client-ip=192.35.17.28; Received: from mail1.siemens.de (mail1.siemens.de [139.23.33.14]) by goliath.siemens.de (8.15.2/8.15.2) with ESMTPS id v92EGib1031577 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 2 Oct 2017 16:16:44 +0200 Received: from MD1KR9XC.ww002.siemens.net ([139.25.69.251]) by mail1.siemens.de (8.15.2/8.15.2) with ESMTP id v92EGhRY028322; Mon, 2 Oct 2017 16:16:44 +0200 From: Christian Storm To: swupdate@googlegroups.com Cc: Christian Storm Subject: [swupdate] [PATCH] Lua: improve stack cleanliness for lua_handlers_init() Date: Mon, 2 Oct 2017 16:13:42 +0200 Message-Id: <20171002141342.14193-1-christian.storm@siemens.com> X-Mailer: git-send-email 2.14.2 X-Original-Sender: christian.storm@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 192.35.17.28 is neither permitted nor denied by best guess record for domain of christian.storm@siemens.com) smtp.mailfrom=christian.storm@siemens.com Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , luaL_requiref() leaves an unused copy of the 'swupdate' module on the stack, remove it. Signed-off-by: Christian Storm --- corelib/lua_interface.c | 1 + 1 file changed, 1 insertion(+) diff --git a/corelib/lua_interface.c b/corelib/lua_interface.c index 0553c1d..e190ebf 100644 --- a/corelib/lua_interface.c +++ b/corelib/lua_interface.c @@ -477,6 +477,7 @@ int lua_handlers_init(void) /* load standard libraries */ luaL_openlibs(gL); luaL_requiref( gL, "swupdate", luaopen_swupdate, 1 ); + lua_pop(gL, 1); /* remove unused copy left on stack */ /* try to load lua handlers for the swupdate system */ if ((ret = luaL_dostring(gL, "require (\"swupdate_handlers\")")) != 0) { INFO("No Lua handler(s) found.");