Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id C63C8431E64 for ; Fri, 30 Mar 2012 16:16:09 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.799 X-Spam-Level: X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id syEaFXsZaNUl for ; Fri, 30 Mar 2012 16:16:09 -0700 (PDT) Received: from mail-pz0-f45.google.com (mail-pz0-f45.google.com [209.85.210.45]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 5E3E6431FAE for ; Fri, 30 Mar 2012 16:16:09 -0700 (PDT) Received: by dacx6 with SMTP id x6so56814dac.18 for ; Fri, 30 Mar 2012 16:16:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=mkSjrE63V0UO6LxveJEQlNNV/Rp+LMoxf9IM3FkxXPs=; b=BzuffVk9hhWeHRmoGISNCo97BbdKQR9vCT144s4EEUEPN8xxPVc0ahWQWlvA4vRl0B lNsLdoPdVFTpZFguvm9FB6eRFWX5qkkQxsRXqaz/eKCkkJ0R32VGt/TD5mcKNcSEThTE w8pRUqzYiVc/wWnPKTH2RX1I6RuZqzVfgNnvWLCSSmeqKqM4Y792/vbRUtpmhICHbj6p 5ycQW3n9EcwFNCScyOz+lfT0KnaKirO/itpeSET0WqTZ4rK2F1m5A+53rV0FwO64mPFP RVC4GShPFQOWfwVYORWqWbWYKlxZJHrpaXEHo+QZRzu0KxrdIbZGiLnfjaCj5KWlHtna H0rg== Received: by 10.68.194.198 with SMTP id hy6mr1491829pbc.0.1333149368598; Fri, 30 Mar 2012 16:16:08 -0700 (PDT) Received: from localhost (215.42.233.220.static.exetel.com.au. [220.233.42.215]) by mx.google.com with ESMTPS id v9sm490955pbn.17.2012.03.30.16.16.05 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 30 Mar 2012 16:16:07 -0700 (PDT) From: Peter Wang To: notmuch@notmuchmail.org Subject: [PATCH v2 1/5] config: Fix free in 'config get' implementation. Date: Sat, 31 Mar 2012 10:15:46 +1100 Message-Id: <1333149350-22616-2-git-send-email-novalazy@gmail.com> X-Mailer: git-send-email 1.7.4.4 In-Reply-To: <1333149350-22616-1-git-send-email-novalazy@gmail.com> References: <1332282698-7951-1-git-send-email-novalazy@gmail.com> <1333149350-22616-1-git-send-email-novalazy@gmail.com> X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Mar 2012 23:16:09 -0000 The array returned by g_key_file_get_string_list() should be freed with g_strfreev(), not free(). --- notmuch-config.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/notmuch-config.c b/notmuch-config.c index e9b2750..85fc774 100644 --- a/notmuch-config.c +++ b/notmuch-config.c @@ -751,7 +751,7 @@ notmuch_config_command_get (void *ctx, char *item) for (i = 0; i < length; i++) printf ("%s\n", value[i]); - free (value); + g_strfreev (value); } notmuch_config_close (config); -- 1.7.4.4