From 28a0ee69c7bc90cb4777f7b82d7f8e5e24b8ac20 Mon Sep 17 00:00:00 2001
From: Tim Wickberg <tim@schedmd.com>
Date: Mon, 28 Jan 2019 22:48:53 -0700
Subject: [PATCH] Remove singular use of try_xmalloc().

Introduced in 360fb080fd1. I don't believe this would solve the
underlying issue on a system that is OOM, and there is another
xmalloc call coming up immediately anyways that would then fatal().
---
 src/plugins/jobacct_gather/common/common_jag.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/src/plugins/jobacct_gather/common/common_jag.c b/src/plugins/jobacct_gather/common/common_jag.c
index f16d908d748..81c50d23a2b 100644
--- a/src/plugins/jobacct_gather/common/common_jag.c
+++ b/src/plugins/jobacct_gather/common/common_jag.c
@@ -518,11 +518,7 @@ static void _handle_stats(List prec_list, char *proc_stat_file,
 	if (fcntl(fd, F_SETFD, FD_CLOEXEC) == -1)
 		error("%s: fcntl(%s): %m", __func__, proc_stat_file);
 
-	prec = try_xmalloc(sizeof(jag_prec_t));
-	if (prec == NULL) {	/* Avoid killing slurmstepd on malloc failure */
-		fclose(stat_fp);
-		return;
-	}
+	prec = xmalloc(sizeof(jag_prec_t));
 
 	if (!tres_count) {
 		assoc_mgr_lock_t locks = {
-- 
GitLab