From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-f193.google.com (mail-pg1-f193.google.com [209.85.215.193]) by dpdk.org (Postfix) with ESMTP id 4F9441B1F7 for ; Mon, 6 Aug 2018 20:11:19 +0200 (CEST) Received: by mail-pg1-f193.google.com with SMTP id r5-v6so6589390pgv.0 for ; Mon, 06 Aug 2018 11:11:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=IA44RVPqzTYLOSCtL+qBxYJ8EV3O8XFxS2ICujXmL0U=; b=jFDErUR4fdFaocoIkGVYiJndfxT25h2KdSaxiVUVLSKdZMQbz4MUYaA5w5aGGoV/hR LO25x4Tw9WIi03MdFqJ9iuG5yh6WN2Tj5kSSChXLeis0IsknrihzJ/CheMLtz+ifCMDE ZdCxCvmjACRCwC5Yq90lvyGkuVqxo+utzZi4CdiA1eeW3NtfL+SkRs4cuIAPVxD6PW+S bWQuyxm7rq0VKLvZIZSVFp5WGsDpA1QeWxKIRki4b3wzpZ1m3BGpjMcPvIT6MIGSnI9Q 5j555wI/5FAqfozJ4pRUMTSh96bDlmCvE296grIsJ7ZBWgJJ8uPnZxylJvvKb+cHyBoo yYzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=IA44RVPqzTYLOSCtL+qBxYJ8EV3O8XFxS2ICujXmL0U=; b=gOadF4CYg3zAVC6gphBjp33WqadMLbNoz5WngGQP8i6MQcV7pKF8xV1w0Klb3phAEy iV+HJ+XjPa9G6m7wYpZJ0ybv3tOEIjiJ9qaMYdoDoNUiCQwvBzHTgtuUA8Eyt+CgFb6p 0LltnrKWf30Ca46yu/p8Ga0k3wpl366+byKCHNyWuyL1qJWPvmayGkv4/T2wRiqEgbwQ 4bMMDGiD15olPLuaB+cuocvgSMQJyRG5cgLqDHdMHBFanEtK1Z9b6Xsols8PoOwGlK+8 6/MPRfgPZdZVyRC4HsAOK8FjUWqEMYupWMkF8bHLGmbjFiaqM2CbLGPBP0Nt9iPfkPhe LfDQ== X-Gm-Message-State: AOUpUlHK7eqeZRiCY8ctKeSaLuHdllVXLaMVnEKjNnli5ed9q4D0szXJ W4cLH8bJOMkW/CKqM4cRimbod3R7/vU= X-Google-Smtp-Source: AAOMgpc52PG6ilG34vuvfhVvZ2jGX/iLAxy50jL4Ae4c7cDFKdifHOvSEuG1timlPxHI3h+u/kNuCA== X-Received: by 2002:a63:a619:: with SMTP id t25-v6mr15295704pge.288.1533579078166; Mon, 06 Aug 2018 11:11:18 -0700 (PDT) Received: from xeon-e3.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id q78-v6sm23388130pfi.185.2018.08.06.11.11.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Aug 2018 11:11:17 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Stephen Hemminger Date: Mon, 6 Aug 2018 11:11:06 -0700 Message-Id: <20180806181108.5913-2-stephen@networkplumber.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180806181108.5913-1-stephen@networkplumber.org> References: <20180806181108.5913-1-stephen@networkplumber.org> Subject: [dpdk-dev] [PATCH 1/3] vmbus: close directory in error path X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Aug 2018 18:11:19 -0000 Fix bug reported by Coverity where directory being scanned was not closed in error path (leaking file descriptor). Coverity issue: 302848 Fixes: 831dba47bd36 ("bus/vmbus: add Hyper-V virtual bus support") Signed-off-by: Stephen Hemminger --- drivers/bus/vmbus/linux/vmbus_uio.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/bus/vmbus/linux/vmbus_uio.c b/drivers/bus/vmbus/linux/vmbus_uio.c index b0f8ebaea6ea..0b1b153cc017 100644 --- a/drivers/bus/vmbus/linux/vmbus_uio.c +++ b/drivers/bus/vmbus/linux/vmbus_uio.c @@ -357,6 +357,7 @@ int vmbus_uio_get_subchan(struct vmbus_channel *primary, if (err) { VMBUS_LOG(NOTICE, "invalid subchannel id %lu", subid); + closedir(chan_dir); return err; } -- 2.18.0