Message ID | 20200217152651.18855-1-sbabic@denx.de |
---|---|
State | Accepted |
Headers | show
Return-Path: <swupdate+bncBCXPLOXJ6IKRBQXBVLZAKGQEDJT6KWQ@googlegroups.com> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:4864:20::13e; helo=mail-lf1-x13e.google.com; envelope-from=swupdate+bncbcxploxj6ikrbqxbvlzakgqedjt6kwq@googlegroups.com; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20161025 header.b=MSPnl0se; dkim-atps=neutral Received: from mail-lf1-x13e.google.com (mail-lf1-x13e.google.com [IPv6:2a00:1450:4864:20::13e]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48LnsM4yhpz9sPk for <incoming@patchwork.ozlabs.org>; Tue, 18 Feb 2020 02:27:03 +1100 (AEDT) Received: by mail-lf1-x13e.google.com with SMTP id y23sf1700318lfh.7 for <incoming@patchwork.ozlabs.org>; Mon, 17 Feb 2020 07:27:03 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1581953219; cv=pass; d=google.com; s=arc-20160816; b=taE7tno0hQQ30htitPNreD3GYXsHVHzL75i5zhRuIPLdro9oh6AeJQ7KdFnfGP3HM4 2JbVwGKVK6/Y6KXoiSPbCpM97OBDOxbCEFFlfsVXo2M7Om3WGq2FTblsHrV1T1baL1Tg eOvpLiHjLDa4Jlsy2ulOc3+bfFVYRWw3L+ZZrW9MP+oVNTdStixxiSms6M5+WLrPC/F9 uApKHGOnpHb4UFhS8EFVkZajXB//YfkN+vW+iV/szsBDiJlOdrDWMTm5WxvvPsH2jm1y WSGIP9YMcY1attzI7Zy7EEQlxnPKgwY0gy60SunaNWjWOGGW4SlmksLDxtf8zXuR6dWj sETA== 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:mime-version:message-id:date :subject:cc:to:from:sender:dkim-signature; bh=QoG0VinMP8RKmisQxizKXgCrt6BPLzs9Lk2Y7H3Xd6s=; b=hOiPaZT4qatNGDTTSsujIjFxupqzGm9pz07oGJ13nj4M/A4rsstsyx24j/PthAA5/f Ubw0w98qugkXuZBQXpvAf0+6KICPlTa6XZgCVBMv6XTUeTF3nd1TDO4F7riVYZ2elJJn LVo3eUPVQ9xszF1gKxJy4LrKdJMwzqk4amrbvSaQb94Z9m4Glf/nV9M3li8gFwp9sdVC mBZ29MQSFI2D0m5Vj6TBJYQLP8iUgrvPqQ2aZ4eoOGV6CFmdplMgcUOhstzsoHqlvElL K/KccGafDsngRbqqDukntho7xP/xXK5Bj0jjqaxeN5aQlWu1ZUhVp/xbg+6AJ6+yTeAW X1Vw== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:mime-version :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=QoG0VinMP8RKmisQxizKXgCrt6BPLzs9Lk2Y7H3Xd6s=; b=MSPnl0sekQ6kvqyr8J64b0bRbgutigcx9D2SROwahFThO7pvr7XvCRfSZFmcM7NAf8 5JM/ymLwKDk4GcT/Ku/cx1RCl1/CJAavhN2IU4U50xLS+d5TTX7C+M+gl3+/deF2jSvr 92eZIacqN7DuFUgqMMw4/qg4Ge2QiiT8/Mz3IRzA2pQ/y0UvrE5rkjP9/bWQNOh068vA 4hMr2lsZ/tn8YDQBTYuyD0KRYOZasA4zzc4nszCXlVVP59Ji2Nx5WNSMSXyZdtr8Cxot Eyzv8RAZ/hU+LQR5mzYka3ZsEl2IuycFYDlae0bSeZWXJCg4BDI/Apgy5zaiLYMpyj2t HXsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:from:to:cc:subject:date:message-id :mime-version: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=QoG0VinMP8RKmisQxizKXgCrt6BPLzs9Lk2Y7H3Xd6s=; b=Ipb70S/teUiUQs5lsu/NKvDIjHY0QgvIXPiOSZabIuH4sx02RcZ3N5VOG2vtMFj7dn tssR8iIko4IBMGCRr3/1jZA0frNYMBzcty84ZvVqO6NHxDxL/38rbt+Oi8xRVoxhpL62 VWFHVrojX7McT0EVjntgb0YvaE5IY0ETR7EHkc+OYLq70YhTtGZKYm6XFrLRKRngyTrV d2FbdmLaZGN1p7JKz+Sa2Yktf0j5ArGNxwxB6lBxo/X/uPzCZ7IBFo8U5ip6cpXoJzFy UWd8t76kD0eR1Fi+pf7qhusuq/DRa0Dk8zDFLyKaPJjKayLwwtE14pU+JKOc8QygIqj5 Qcew== Sender: swupdate@googlegroups.com X-Gm-Message-State: APjAAAUERrDOevO760gEsUAVQjvwm4+wzo9Lo3cfZZtpPxuWB7E/y/Qp cibI9+xu56pafCLh1F6hzb0= X-Google-Smtp-Source: APXvYqyTVkCX5+iDdA1JynotC7B8jD94+DUHT9dMSFgxbrQdEOWa0PXcJbKst/2VwIwe6AtdtrehIg== X-Received: by 2002:a2e:8145:: with SMTP id t5mr10445389ljg.144.1581953219007; Mon, 17 Feb 2020 07:26:59 -0800 (PST) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a2e:b4e7:: with SMTP id s7ls1818385ljm.10.gmail; Mon, 17 Feb 2020 07:26:58 -0800 (PST) X-Received: by 2002:a2e:99da:: with SMTP id l26mr10130884ljj.272.1581953218229; Mon, 17 Feb 2020 07:26:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581953218; cv=none; d=google.com; s=arc-20160816; b=lvxbAqCBj3dJqgC4jaqcoXAJp7J3KvrOqLguue05NbsZ17qR2TdpKMB3cftkFCZ5wb 53DEO2emGxnkn8jahw3UjerQDUw/e1/bVJVE5fawOJRlEX0WWM8ygT5DogFsfQlJcbcY k5vCdqjlFvhgBQgA7eUhVtS+IRukAXaBW74ajnzpHob+Y9Lyn+mhfP022SQn4yZtHJI2 Ye02caWzKMUlIxfmitA4ZKeuRp5i4aHlDxKFkA715iyE1gKUur9B1ma6hvV7MCgRtWop ioCYjD8w/UQUQ+30RMmJuXnpD8qHJaZq16LXgRrN2okCyB1nYs55thzAH0Ud33GaQBas bYJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from; bh=NZgvdMCVDCUJoQXQLpaYB5oRmTX0Iu8ehDDtp8bESUU=; b=U4FSe0PnmrMC6JeHcKpzaPf3ZtXA9VH7qQggKFsTZA0g9MuO3e2ipz1uSUTN3qV9TK N/QrJcsgcctJ3MjrVsmTmHCdETZXG4HiLPUlQuESiIbzNiLoNHeZZcX74VjmuCbiFpzL u7M2Wz0YVmgSAY5JRpdyJh5tsVQlZtBJjPJ/q8xCyLvsOMz6NW9R8vqheju0pC8YGwEF QWKRp+Mz6EAFFCDrH5hn3v5BxDSmirdwQf8AQy8VTe3hBslmhM7UQl22aoTA6llOvxOd ETDiGrVblxThCwcqrZ7tLSsjgOOaPQ7lmcDzwsd/cl7vvYTOUwsQsjp9ltfeALb9PpbS RdiA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de Received: from mail-out.m-online.net (mail-out.m-online.net. [212.18.0.9]) by gmr-mx.google.com with ESMTPS id b29si56944lfo.2.2020.02.17.07.26.58 for <swupdate@googlegroups.com> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Feb 2020 07:26:58 -0800 (PST) Received-SPF: neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) client-ip=212.18.0.9; Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 48LnsF4MkPz1qr56; Mon, 17 Feb 2020 16:26:57 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 48LnsF4BDwz1qrmb; Mon, 17 Feb 2020 16:26:57 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id s3Pu240REzkv; Mon, 17 Feb 2020 16:26:56 +0100 (CET) Received: from babic.homelinux.org (host-88-217-136-221.customer.m-online.net [88.217.136.221]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPS; Mon, 17 Feb 2020 16:26:56 +0100 (CET) Received: from localhost (mail.babic.homelinux.org [127.0.0.1]) by babic.homelinux.org (Postfix) with ESMTP id E913C454041E; Mon, 17 Feb 2020 16:26:56 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at babic.homelinux.org Received: from babic.homelinux.org ([127.0.0.1]) by localhost (mail.babic.homelinux.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9ivFYYVQQkXf; Mon, 17 Feb 2020 16:26:54 +0100 (CET) Received: from paperino.fritz.box (paperino.fritz.box [IPv6:2001:a61:6175:5d01:f546:6b75:97da:3506]) by babic.homelinux.org (Postfix) with ESMTP id 60FC14540402; Mon, 17 Feb 2020 16:26:54 +0100 (CET) From: Stefano Babic <sbabic@denx.de> To: swupdate@googlegroups.com Cc: Stefano Babic <sbabic@denx.de> Subject: [swupdate] [libubootenv][PATCH] BUG: variable lists not released in close() Date: Mon, 17 Feb 2020 16:26:51 +0100 Message-Id: <20200217152651.18855-1-sbabic@denx.de> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Original-Sender: sbabic@denx.de X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: <swupdate.googlegroups.com> X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: <https://groups.google.com/group/swupdate/post>, <mailto:swupdate@googlegroups.com> List-Help: <https://groups.google.com/support/>, <mailto:swupdate+help@googlegroups.com> List-Archive: <https://groups.google.com/group/swupdate List-Subscribe: <https://groups.google.com/group/swupdate/subscribe>, <mailto:swupdate+subscribe@googlegroups.com> List-Unsubscribe: <mailto:googlegroups-manage+605343134186+unsubscribe@googlegroups.com>, <https://groups.google.com/group/swupdate/subscribe> |
Series |
[libubootenv] BUG: variable lists not released in close()
|
expand
|
diff --git a/src/uboot_env.c b/src/uboot_env.c index 8926373..d619ee0 100644 --- a/src/uboot_env.c +++ b/src/uboot_env.c @@ -1369,6 +1369,7 @@ void libuboot_close(struct uboot_ctx *ctx) { free(e->name); if (e->value) free(e->value); + LIST_REMOVE(e, next); free(e); } }
The list is not released in the close and this cause a segfault if the same context is reused (as it is supposed to be). Segfault does not happen if the context is released and a new one is created. Signed-off-by: Stefano Babic <sbabic@denx.de> --- src/uboot_env.c | 1 + 1 file changed, 1 insertion(+)