Message ID | 20200416191401.10717-1-sbabic@denx.de |
---|---|
State | Accepted |
Headers | show
Return-Path: <swupdate+bncBCXPLOXJ6IKRB7644L2AKGQEGUDDBRQ@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::437; helo=mail-wr1-x437.google.com; envelope-from=swupdate+bncbcxploxj6ikrb7644l2akgqeguddbrq@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=N5Tw6MOT; dkim-atps=neutral Received: from mail-wr1-x437.google.com (mail-wr1-x437.google.com [IPv6:2a00:1450:4864:20::437]) (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 49386C405Fz9sSY for <incoming@patchwork.ozlabs.org>; Fri, 17 Apr 2020 05:14:11 +1000 (AEST) Received: by mail-wr1-x437.google.com with SMTP id i10sf1756171wrq.8 for <incoming@patchwork.ozlabs.org>; Thu, 16 Apr 2020 12:14:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1587064447; cv=pass; d=google.com; s=arc-20160816; b=jM+pK4KQTekhCcf9jz86IZQY8rvJkfMC+EIV1SsNNFkbeXq54JaQnBwupw6IlpXMUC HfuFmv9iF/7RW5qNe6u+ZxTxFJsnStGvQqVBSerxeMJVNMMNReGbk6kIaLbSrbcjVEwy gMUxigFfakoU7nrjMvK66VY7hzp3gZkvkCUlOXvGEJbbIbL2aFiJTRYHoWNlnoUlPhkN e5eRXq+XO5ZmSpQ77wn7Sc5SEfYuB7daKe2dZA7OiIHGOzDdRx+q18bFoK8wSMH2OJhP jGYu+PrdSD1OImiIC4oZEG+ejnc9pY3lPi4fO+WfxoqIXw7aL68isq+n7kdmKpvqIjBh NIFA== 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=zWGXXMYUD5hC0ErgdROFqsEaTNZLVNaJQ0mxMeA+hoE=; b=S1x/mLak5e4EwlBJ5NgvfFRWSWCkBpmV2wUfjqpiR0NR2lAEBybnygk9We3kllWFfG z/cDUB4YrfwR7cKejHAzFGWQL4SPgh1cCM8i1CL5xgw2RRed4EKq4OVnORJtHIjGuXmF A5oIRArf/E0Ce8nSntuF4vXA/WIdM0AZZsPAdorE6JdA8iwuHLPtLsGfqKY87We2L0Bi n/PQJsYLXjTNx3BxCnEpJjdJ5CXYrhkupwQHv7vjDCcEEtiSbFGjYisJQL8kHmX3m9Bt 4SkhDizmAxJtNGxWNbWGjEW/OmjBlq6ILLX+A+QHSKpTEzcCxcnJCmXlSySj8ccUHYNc nlQw== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.10 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=zWGXXMYUD5hC0ErgdROFqsEaTNZLVNaJQ0mxMeA+hoE=; b=N5Tw6MOTpTCUgLiG8SjFCa000ygnB1tAuEvGzqtjya/BJYwacG/9BLRK98YJs4bScJ L1kcbePdeeko8UORfGTFperMg+blvumFVnB5XjFO6ztHOP+fpA17T5LrLgUta99HV6mS +p9A2F6USyE1Q51VYqOZ/REGv8oWG8wKqglDXMsd4r9wTgeWqfER27PcnvNY8g+kf5vw cuEL0xc6zilgTRsTFQsfoYk2hgaXOLUXaSUJk7+64THNZ7vrEA8DPT5L9a2dPvyjotn+ KlpxWjMbTY+Ggn5wBonlF2a88SHNYkUPeTCZGVp7OD55ZS75VwZ7JjnQiES0OMPjTgEF bnPQ== 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=zWGXXMYUD5hC0ErgdROFqsEaTNZLVNaJQ0mxMeA+hoE=; b=W8cViBNH645YWfcjybVND2lsEgL6LXG9xtBawDOxk7gs4exYB9/DPmig8v4ogtu9Np qqF4PxwInV+42yBYneZ1to+Waw8goi/piM5mpJhwr0t/RKagcO9dX6YiXAKDwUtGhWj/ OcCnAVHRQYn49YbtQ5vV0UdYZraqXDnwOlpsna+Irwca5CeIbYUQckkpQsxAJ41LmJzY vNi6ugnenFLP3Tnz3UGyBdafLtyeoRLLkwDezs22bVXpDWyGaCxcyGvN4gyS8v1UgzGH 5iute+EMhFJ2UPiAWg93+B389yn/jJnyBCT9TKX2Ko+N2WeoHKu3ZC6n7UilOtPknBnY 4MEA== Sender: swupdate@googlegroups.com X-Gm-Message-State: AGi0PuY/gaucd/uHD8nxldjk51kG9biZO9ESblCIuSp2oZ0YaTKPUBg/ PCydaVZi/Py8bZlDYXv7+TQ= X-Google-Smtp-Source: APiQypI3r0mpW4KhP2l3t+zv3VKA+i8SwzzW+aEcN3ECE2xgF5nEbIjw70IsKbN8VoiRx09FNbM7hA== X-Received: by 2002:a7b:c14b:: with SMTP id z11mr6165333wmi.44.1587064447396; Thu, 16 Apr 2020 12:14:07 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a5d:4a83:: with SMTP id o3ls10366706wrq.7.gmail; Thu, 16 Apr 2020 12:14:06 -0700 (PDT) X-Received: by 2002:adf:fe44:: with SMTP id m4mr30603239wrs.188.1587064446662; Thu, 16 Apr 2020 12:14:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587064446; cv=none; d=google.com; s=arc-20160816; b=vc/BuzfbRMDn2rnbuE+CpjFAqvHgz92SBjN3PBJzg7IPIAvUbQYeTUQOn65mNL7ZZp jbGkLY51vETlVPVDQ18SnKIwXaMT/LOz1TPP0R5DaHRaXRe0Li8rfJEZOJl1SembbiCK nxrY4kVLGwALwK2O6Sw0KODxd+dimY48WdK6kH/J/p9Zo/2O5GivCOA3WJ/n/vpz0gef zK87dMatq5vqeDJYKRLBq9DoL5yYBMG4pla7hi549rUzSJafqNV7uLm+NaNRfiEE0gLY OhwOdekxdKPVs6sH8QmJm7uBdF5CZ0prnHunR+DSiNOxXt8GTeQBdHYBYBvz8Yb8lmmQ ENBw== 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=8wyJgpBdsymmeAGbaWTR+yC9eSN+7/FBySBkZAlDEP0=; b=kHTp7ljPU6MSbH2f8LO0gAfMdCWgZJCQ+90+Ch0nwD/qHMehsabP8TOEJIpAXYrUaz zOosQPBTdzDwU6k8A6JPNQRr16B27RdCD/lMw1fB/H/Hc041x2zAm1J4qviS8S41cTgK 5R9iIE+6E1ft1P93nm0RX0CWsr5oGiOk+fuSq76DDzQhtDUVvYEnjV5wDO+SjzvfNsVE fFtsUAqi1yKKT3Z16+9j84pIQQbzpntvDHaUhCqvIzWYspoV5O9eNRpXPGL3PzTwVcEo yXg5A+6oQ7/zrfezMZRODTpapoOQAUlHgoFM+EW/bFb5SrOM+Kz8tSWupynLkVBfAlHr MMCw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.10 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.10]) by gmr-mx.google.com with ESMTPS id s22si245867wme.0.2020.04.16.12.14.06 for <swupdate@googlegroups.com> (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Apr 2020 12:14:06 -0700 (PDT) Received-SPF: neutral (google.com: 212.18.0.10 is neither permitted nor denied by best guess record for domain of sbabic@denx.de) client-ip=212.18.0.10; Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4938663Jpxz1rrkY; Thu, 16 Apr 2020 21:14:06 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 49386635qDz1qqkw; Thu, 16 Apr 2020 21:14:06 +0200 (CEST) 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 7WzHAuZ4UwyQ; Thu, 16 Apr 2020 21:14:05 +0200 (CEST) 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; Thu, 16 Apr 2020 21:14:05 +0200 (CEST) Received: from localhost (mail.babic.homelinux.org [127.0.0.1]) by babic.homelinux.org (Postfix) with ESMTP id 624B44540953; Thu, 16 Apr 2020 21:14:05 +0200 (CEST) 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 Mtjf9UxiPt3Z; Thu, 16 Apr 2020 21:14:02 +0200 (CEST) Received: from paperino.fritz.box (paperino.fritz.box [192.168.178.38]) by babic.homelinux.org (Postfix) with ESMTP id D7BAA454053E; Thu, 16 Apr 2020 21:14:02 +0200 (CEST) From: Stefano Babic <sbabic@denx.de> To: swupdate@googlegroups.com Cc: Stefano Babic <sbabic@denx.de> Subject: [swupdate] [PATCH] ucfw_handler: Fix coverity #292172 Date: Thu, 16 Apr 2020 21:13:58 +0200 Message-Id: <20200416191401.10717-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.10 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> |
diff --git a/handlers/ucfw_handler.c b/handlers/ucfw_handler.c index cf6de74..19a778e 100644 --- a/handlers/ucfw_handler.c +++ b/handlers/ucfw_handler.c @@ -473,7 +473,8 @@ static int get_gpio_from_property(struct dict_list *prop, struct mode_setup *gpi memset(gpio, 0, sizeof(*gpio)); LIST_FOREACH(entry, prop, next) { - char *s = strdup(entry->value); + char *sstore = strdup(entry->value); + char *s = sstore; for (i = 0; i < 3; i++) { char *t = strchr(s, ':'); @@ -498,6 +499,7 @@ static int get_gpio_from_property(struct dict_list *prop, struct mode_setup *gpi break; s = ++t; } + free(sstore); } return 0;
Signed-off-by: Stefano Babic <sbabic@denx.de> --- handlers/ucfw_handler.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)