From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id 6D7893858D20 for ; Thu, 28 Sep 2023 11:16:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6D7893858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id A79942188D; Thu, 28 Sep 2023 11:16:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1695899760; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=olxSSX9mQI7FGfLCZaop3vHDOz0H128rTNdTj8u9aSI=; b=cniaJgniP3Hty0IjHn7MBGQNHfBEEP8IgTqBguT1PJ8J7+4RCU7a0YXB7DOockdVIa1eoT Awsj+YhWLFZs9X3VHXZ+9yw9Tu3LMV2byFf0wYOPkVn44hQ4mcAt4jJPZgReaHYBF91dc5 c5bv8Vi+JSxw7X110y6W0DhDRfH8YAA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1695899760; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=olxSSX9mQI7FGfLCZaop3vHDOz0H128rTNdTj8u9aSI=; b=KrGsHymuvqmuMV4YxTwwq+6TYNz4psVyZ1Fb0qUPxhRiTUVKUuK/MXkChdkyGl4NEeFv2W YlYxHvPgLwrJiICA== Received: from hawking.nue2.suse.org (unknown [10.168.4.11]) by relay2.suse.de (Postfix) with ESMTP id 8AD5F2C142; Thu, 28 Sep 2023 11:16:00 +0000 (UTC) Received: by hawking.nue2.suse.org (Postfix, from userid 17005) id 9AACE4A0399; Thu, 28 Sep 2023 13:16:00 +0200 (CEST) From: Andreas Schwab To: Joe Simmons-Talbott Cc: libc-alpha@sourceware.org Subject: Re: [PATCH] nss: Get rid of alloca usage in makedb's write_output. In-Reply-To: <20230926135528.3517253-1-josimmon@redhat.com> (Joe Simmons-Talbott's message of "Tue, 26 Sep 2023 09:54:48 -0400") References: <20230926135528.3517253-1-josimmon@redhat.com> X-Yow: FOOLED you! Absorb EGO SHATTERING impulse rays, polyester poltroon!! Date: Thu, 28 Sep 2023 13:16:00 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Sep 26 2023, Joe Simmons-Talbott wrote: > @@ -802,6 +812,7 @@ write_output (int fd) > assert (iov_nelts <= INT_MAX); > if (writev (fd, iov, iov_nelts) != keydataoffset) > { > + scratch_buffer_free (&sbuf); > error (0, errno, gettext ("failed to write new database file")); > return EXIT_FAILURE; Does scratch_buffer_free guarantee that errno is not changed? -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."