From nobody Wed Feb 09 00:48:07 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 2E4AA19B6D7B; Wed, 9 Feb 2022 00:48:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Jth7X3qLsz4tPm; Wed, 9 Feb 2022 00:48:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644367689; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/m8Db6QHAzxl+ZhfdvEpV8GBVV8dMDljUtLdj+XBEEw=; b=d0k3PkD3ZnB5yUGYClHCsWKey4isXNMi9yXdY7pXsd7FZ8Yuc0Otgnir7vHgh9xZGpG/gL 8nwa+QunnBOb/1un1+qZ2w4PelLmiZQJ3i8WluwieXZAFBZb5u0fBKxERX5WEAIFj2VfuS 8MwZKL604XFFa4mnJd6LKE/qm7Uu4eel0goSICF1ZlFtFGlSIpz44Y0fzyEKLyJ3oQrxTs nRFVk6Efe03D0AhlJjO56q9PNdRdX8Mh5n0/AsPkrwxqu7dAHZEFpdL+ykh22Nrq+1173g AC6ZzGPWJ0tALEKqsX14XTKRomYNsLBze6joYtz6Ji1PONW40BPhVGOp4BmiAg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DA242235CE; Wed, 9 Feb 2022 00:48:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 2190m78D083698; Wed, 9 Feb 2022 00:48:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2190m7NC083697; Wed, 9 Feb 2022 00:48:07 GMT (envelope-from git) Date: Wed, 9 Feb 2022 00:48:07 GMT Message-Id: <202202090048.2190m7NC083697@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: 3e4e8d5cbfcd - stable/13 - xlocale.c: check for allocation failure List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 3e4e8d5cbfcd2161d7cdd513ad9d7d88f703fcb8 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1644367689; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/m8Db6QHAzxl+ZhfdvEpV8GBVV8dMDljUtLdj+XBEEw=; b=CCSyfGq1b4Mb3iglQqsp8TKKIQmRrVZqUkQFTe7r9TCGW8ocFEsA41K0dyhXDQHWaATG+C yl/RKfG0PlZOmGGP9r3VIndOrRCdM8tGdAgKrVVJnlmEMQKPpzRx4Lqn8WDe/XS5z59kVk yWYT3B8fUwWYejmBt6h6Mbtx/9YyhQs3V6lGkzjcvAOKQzZKmB2q0DJ1SghaNn5dWR/y/q AJ+7fc1K4yLZygn087FELPH/N4c3L8WzEEg7IngLQmmgD3bVkX9WVd6Ifs0XJ3Muh0tYHw vneM/yOOmkDLKX+TNDiJWOCrC7b3rVe66T72raxLugFprgc4O5zytVidkbzrTA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1644367689; a=rsa-sha256; cv=none; b=VAw/hZUVfY+CN1B9WDY4pI8aXHfv4G6r5Uzhy3aWyTifesmC5UutSfff0LNj9suUr9lkgh mf/WeZKVOeR2FQ5bn5w2mSOiB1L1G7lhvhQUVVr4VMu/dT31pG1p91XigM6+uNXWLr04zQ zHUBw86FmHXqGoVNJAHIGg4+4qsPWKlua9UockEkPdILg2O41hglf7EonNq1jSJBiFCqBV myhpNvQ2kCmYg1bJ5vw9wIoaryYERQiQ8ehyYhs4Ok5/1BpVbbE8DwiOwVcd/N7ColEI6G AVfHV7Iz5sg6z1qE5lbem/oD3DW36qy6mrXnRRBSJuZBaMcyX3rBfIPyS+IUZQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=3e4e8d5cbfcd2161d7cdd513ad9d7d88f703fcb8 commit 3e4e8d5cbfcd2161d7cdd513ad9d7d88f703fcb8 Author: Konstantin Belousov AuthorDate: 2022-02-02 17:24:42 +0000 Commit: Konstantin Belousov CommitDate: 2022-02-09 00:42:45 +0000 xlocale.c: check for allocation failure PR: 261679 (cherry picked from commit b68522308d1e0b19c00d82c13878a693fc2ef2df) --- lib/libc/locale/xlocale.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/libc/locale/xlocale.c b/lib/libc/locale/xlocale.c index e07568775394..467d6e6e5aee 100644 --- a/lib/libc/locale/xlocale.c +++ b/lib/libc/locale/xlocale.c @@ -198,6 +198,9 @@ alloc_locale(void) { locale_t new = calloc(sizeof(struct _xlocale), 1); + if (new == NULL) + return (NULL); + new->header.destructor = destruct_locale; new->monetary_locale_changed = 1; new->numeric_locale_changed = 1;