From patchwork Wed Apr 15 15:04:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 3467 Return-Path: Received: from o1.f.az.sendgrid.net (o1.f.az.sendgrid.net [208.117.55.132]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 6F4B960404 for ; Wed, 15 Apr 2020 17:04:15 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=uajain.com header.i=@uajain.com header.b="X7yGy1oU"; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=uajain.com; h=from:subject:mime-version:to:cc:content-transfer-encoding: content-type; s=s1; bh=E3O98DfBXAtWtGbf+FWVZZj1QfwdZVnI//e59OY8fe0=; b=X7yGy1oUPdYOyQEviSPN1hmhd0sJdaBqFFHdp17LjJbDLda51Wh+HWODTyBPvdm3ZQeA +UW5FD5dhSDj/0K0L5iG++qQrRDl5yiKX5onPwhEkD0NuDT33e7Av8AV0ZH24e81/tq2fL 5K0V6/Yd48vp8Ot/AmGBmhoVnbRfBXUIo= Received: by filterdrecv-p3iad2-8ddf98858-mlrf4 with SMTP id filterdrecv-p3iad2-8ddf98858-mlrf4-17-5E97226D-BE 2020-04-15 15:04:13.805329486 +0000 UTC m=+1778201.553839166 Received: from mail.uajain.com (unknown) by ismtpd0003p1hnd1.sendgrid.net (SG) with ESMTP id 3fxxwWEqTZ2-JkzqqoOb0w Wed, 15 Apr 2020 15:04:13.451 +0000 (UTC) From: Umang Jain Date: Wed, 15 Apr 2020 15:04:13 +0000 (UTC) Message-Id: <20200415150409.27938-1-email@uajain.com> Mime-Version: 1.0 X-SG-EID: 1Q40EQ7YGir8a9gjSIAdTjhngY657NMk9ckeo4dbHZDiOpywc/L3L9rFqlwE4KPcROc560Os82e1tQwAlD2FoHisHuJE98kRxDLCgvedkPMRumuwfRwTyOIXRT0F7uoPj+XMSBOYXjU7lMr+eTGlkti+cu8J2Zi//JMEE1jKH/qGDDIRQArq8WhfBAQYj8KYg5a1l3i0N6GA5jybBp74mW5q/mjmRGyT8KfizT7uuTY/wlaKGp4/1t52etwpMTjsIX7pwQEmt1HHzrrWRbkEiw== To: libcamera-devel@lists.libcamera.org Subject: [libcamera-devel] [PATCH v2 0/2] Coverity scans fixes X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Apr 2020 15:04:16 -0000 This is the v2 for initial covierity scan fixes I sent. Changelog: * test: ipc: unixsocket: Close open fds on error paths - Use of FileDescriptor as asked by Laurent. I found this to be a bit tricky and I am not sure if opening new fds in prepareFDs, frees them down the line. The tests states comments like "Test fire and forget" so I am not sure what's the level of pedanticism we need. Happy to re-work though. * test: log: log_api: Close open fds on error paths - Cleanup logSetFile(path) error path too as pointed out by Kieran. Umang Jain (2): test: ipc: unixsocket: Close open fds on error paths test: log: log_api: Close open fds on error paths test/ipc/unixsocket.cpp | 19 ++++++++++++------- test/log/log_api.cpp | 2 ++ 2 files changed, 14 insertions(+), 7 deletions(-)