1 Return-Path: <jani@nikula.org>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id 19665429E25
\r
6 for <notmuch@notmuchmail.org>; Sun, 3 Nov 2013 04:25:13 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
8 X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References"
\r
12 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5
\r
13 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
14 Received: from olra.theworths.org ([127.0.0.1])
\r
15 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
16 with ESMTP id NOUvA7U09Bcf for <notmuch@notmuchmail.org>;
\r
17 Sun, 3 Nov 2013 04:25:07 -0800 (PST)
\r
18 Received: from mail-ee0-f47.google.com (mail-ee0-f47.google.com
\r
19 [74.125.83.47]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client
\r
20 certificate requested) by olra.theworths.org (Postfix) with ESMTPS id
\r
21 E1A90431FD2 for <notmuch@notmuchmail.org>; Sun, 3 Nov 2013 04:25:02 -0800
\r
23 Received: by mail-ee0-f47.google.com with SMTP id c13so586300eek.34
\r
24 for <notmuch@notmuchmail.org>; Sun, 03 Nov 2013 04:25:01 -0800 (PST)
\r
25 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
\r
26 d=1e100.net; s=20130820;
\r
27 h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to
\r
28 :references:in-reply-to:references;
\r
29 bh=26rNZKY9wxF06O1EkFrBz3W+YYp7I8PmFRmeihyPWPY=;
\r
30 b=kLIYDWBeAnTi553/k7lnSLrjLVQhYg1pX0uWB8XvPmFXBfWfBiCufHzFm+Z289Bs5M
\r
31 Imt8AsyyV57BfeQlcMx/MdvadJ17/53rttKgCvhhZMy2ZHYwe8wbSBRMjbeRUkI3c0wH
\r
32 eyitvaS3r33LHRsEycUQcZXGCceydivJFjBXHtqhP3+YJTcTjORRsr9ckyvy34va1493
\r
33 oGCAn7MyfzayBQXdQrDqQFTcRtoKwUl7GGk4R+rvRnQXms2bvE895Yb81fKlCEYSNsef
\r
34 Pn/AQazYd7vrPQatcaMy5S3lMbE0iTWOsHf2p7P341Eq5cVRFz0gt+v9NADf9uz4F2bu
\r
37 ALoCoQlIhgLXp0DR9nmkQJsh7utoFtODgpaQjkcF7RFLL07YVp7f3WNPRjOR3k/LAuVRKCfGzIwF
\r
38 X-Received: by 10.15.50.195 with SMTP id l43mr12706005eew.30.1383481501743;
\r
39 Sun, 03 Nov 2013 04:25:01 -0800 (PST)
\r
40 Received: from localhost (dsl-hkibrasgw2-58c36f-91.dhcp.inet.fi.
\r
42 by mx.google.com with ESMTPSA id k7sm32793779eeg.13.2013.11.03.04.25.00
\r
43 for <multiple recipients>
\r
44 (version=TLSv1.2 cipher=RC4-SHA bits=128/128);
\r
45 Sun, 03 Nov 2013 04:25:01 -0800 (PST)
\r
46 From: Jani Nikula <jani@nikula.org>
\r
47 To: notmuch@notmuchmail.org
\r
48 Subject: [PATCH v2 03/11] lib: check talloc success in compact
\r
49 Date: Sun, 3 Nov 2013 14:24:43 +0200
\r
51 <ec27cd37b66a5a171bf5ad5897ab729e9b8e09c0.1383481295.git.jani@nikula.org>
\r
52 X-Mailer: git-send-email 1.8.4.rc3
\r
53 In-Reply-To: <cover.1383481295.git.jani@nikula.org>
\r
54 References: <cover.1383481295.git.jani@nikula.org>
\r
55 In-Reply-To: <cover.1383481295.git.jani@nikula.org>
\r
56 References: <cover.1383481295.git.jani@nikula.org>
\r
57 X-BeenThere: notmuch@notmuchmail.org
\r
58 X-Mailman-Version: 2.1.13
\r
60 List-Id: "Use and development of the notmuch mail system."
\r
61 <notmuch.notmuchmail.org>
\r
62 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
63 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
64 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
65 List-Post: <mailto:notmuch@notmuchmail.org>
\r
66 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
67 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
68 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
69 X-List-Received-Date: Sun, 03 Nov 2013 12:25:13 -0000
\r
71 In line with the allocation checks all around.
\r
73 lib/database.cc | 6 +++++-
\r
74 1 file changed, 5 insertions(+), 1 deletion(-)
\r
76 diff --git a/lib/database.cc b/lib/database.cc
\r
77 index 3dfea0f..7a8702e 100644
\r
78 --- a/lib/database.cc
\r
79 +++ b/lib/database.cc
\r
80 @@ -863,13 +863,17 @@ notmuch_database_compact (const char* path,
\r
81 const char* backup_path,
\r
82 notmuch_compact_status_cb_t status_cb)
\r
84 - void *local = talloc_new (NULL);
\r
86 char *notmuch_path, *xapian_path, *compact_xapian_path;
\r
87 char *old_xapian_path = NULL;
\r
88 notmuch_status_t ret = NOTMUCH_STATUS_SUCCESS;
\r
89 notmuch_database_t *notmuch = NULL;
\r
90 struct stat statbuf;
\r
92 + local = talloc_new (NULL);
\r
94 + return NOTMUCH_STATUS_OUT_OF_MEMORY;
\r
96 ret = notmuch_database_open(path, NOTMUCH_DATABASE_MODE_READ_WRITE, ¬much);
\r