From patchwork Mon Dec 30 15:56:49 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paulo Zanoni X-Patchwork-Id: 3419731 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 3EA2FC02DD for ; Mon, 30 Dec 2013 15:57:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 923F5200F3 for ; Mon, 30 Dec 2013 15:57:30 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 3EADB20115 for ; Mon, 30 Dec 2013 15:57:27 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E62A9FB700; Mon, 30 Dec 2013 07:57:22 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-qc0-f172.google.com (mail-qc0-f172.google.com [209.85.216.172]) by gabe.freedesktop.org (Postfix) with ESMTP id 5BE08FB757 for ; Mon, 30 Dec 2013 07:57:11 -0800 (PST) Received: by mail-qc0-f172.google.com with SMTP id e16so10962397qcx.17 for ; Mon, 30 Dec 2013 07:57:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=+vcx+B85599zZxuMzdb098OQpV8VpNr+fb+uteXLXNo=; b=cTCuClT82SCQ4DoEGfFhH8BbeTcGEfb9rJha/DCG/rWZ0eT6oLyuVbNQRiHcjN5h32 ZtS/avDdthc7uQV/YmcQ17Ap/X5uDf5ZyQYj0O2frEDP0YGZQwGcP/Gg9eV5sbnlNPYE JVACGI3qusrzROpTsqHCISoIzVCsIhR3qicn4Hia7gd6pkmoNaZEOhsSHzS3UqrE08s2 kayVaBYkUQuS8MIwpxN49dFFvEbYN4z2hYHlcqL6JZ5jXBu8qwbYWxgG5Otc09sCHzRM 98xOTAoIUQ/8mPyJBmgM1nHkSO+FzVlWrvEz8DyM1A5m0P33EUqawlAXyYWYxO+Cc1Pb f9DQ== X-Received: by 10.224.13.141 with SMTP id c13mr101872796qaa.76.1388419030933; Mon, 30 Dec 2013 07:57:10 -0800 (PST) Received: from localhost.localdomain ([187.112.58.219]) by mx.google.com with ESMTPSA id o3sm66129491qak.5.2013.12.30.07.57.09 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 30 Dec 2013 07:57:10 -0800 (PST) From: Paulo Zanoni To: intel-gfx@lists.freedesktop.org Date: Mon, 30 Dec 2013 13:56:49 -0200 Message-Id: <1388419013-17016-2-git-send-email-przanoni@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1388419013-17016-1-git-send-email-przanoni@gmail.com> References: <1388419013-17016-1-git-send-email-przanoni@gmail.com> Cc: Paulo Zanoni Subject: [Intel-gfx] [PATCH 2/6] drmtest: don't leak memory when parsing the arguments X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Paulo Zanoni Found this while investigating memory leaks on kms_flip. Detected by Valgrind. Signed-off-by: Paulo Zanoni --- lib/drmtest.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/drmtest.c b/lib/drmtest.c index 3d79a4d..7275b7f 100644 --- a/lib/drmtest.c +++ b/lib/drmtest.c @@ -911,6 +911,8 @@ int igt_subtest_init_parse_opts(int argc, char **argv, oom_adjust_for_doom(); out: + free(short_opts); + free(combined_opts); print_version(); return ret;