Blame leave-malloc-check-set.diff

e7c455
From 8763969a4a5f19231c0d851e5d50eff614cf5940 Mon Sep 17 00:00:00 2001
e7c455
Date: Thu, 23 Jan 2020 13:43:36 +0100
e7c455
Subject: [PATCH] Do not unset $MALLOC_CHECK_
e7c455
e7c455
How do we even _know_ user wants to debug malloc in rpmbuild,
e7c455
maybe user wants to debug it in _the child_?
e7c455
e7c455
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
e7c455
---
e7c455
 build/rpmfc.c    | 1 -
e7c455
 lib/rpmscript.c  | 3 ---
e7c455
 sign/rpmgensig.c | 1 -
e7c455
 3 files changed, 5 deletions(-)
e7c455
e7c455
--- ./build/rpmfc.c
e7c455
+++ ./build/rpmfc.c
e7c455
@@ -319,7 +319,6 @@ static int getOutputFrom(ARGV_t argv,
e7c455
 	if (buildRoot)
e7c455
 	    setenv("RPM_BUILD_ROOT", buildRoot, 1);
e7c455
 
e7c455
-	unsetenv("MALLOC_CHECK_");
e7c455
 	execvp(argv[0], (char *const *)argv);
e7c455
 	rpmlog(RPMLOG_ERR, _("Couldn't exec %s: %s\n"),
e7c455
 		argv[0], strerror(errno));
e7c455
--- ./lib/rpmscript.c
e7c455
+++ ./lib/rpmscript.c
e7c455
@@ -245,9 +245,6 @@ static void doScriptExec(ARGV_const_t argv, ARGV_const_t prefixes,
e7c455
     }
e7c455
 	
e7c455
     if (chdir("/") == 0) {
e7c455
-	/* XXX Don't mtrace into children. */
e7c455
-	unsetenv("MALLOC_CHECK_");
e7c455
-
e7c455
 	xx = execv(argv[0], argv);
e7c455
 	if (xx) {
e7c455
 	    rpmlog(RPMLOG_ERR,
e7c455
--- ./sign/rpmgensig.c
e7c455
+++ ./sign/rpmgensig.c
e7c455
@@ -216,7 +216,6 @@ static int runGPG(sigTarget sigt, const char *sigfile)
e7c455
 	dup2(pipefd[0], STDIN_FILENO);
e7c455
 	close(pipefd[1]);
e7c455
 
e7c455
-	unsetenv("MALLOC_CHECK_");
e7c455
 	cmd = rpmExpand("%{?__gpg_sign_cmd}", NULL);
e7c455
 	rc = poptParseArgvString(cmd, NULL, (const char ***)&av;;
e7c455
 	if (!rc)