Blame SOURCES/0002-mem-leak-verbose.patch

7e4903
diff -ruNp a/src/run-as-child.c b/src/run-as-child.c
7e4903
--- a/src/run-as-child.c	2021-10-14 08:17:04.556107815 +0200
7e4903
+++ b/src/run-as-child.c	2021-10-14 08:36:23.686706344 +0200
7e4903
@@ -98,8 +98,14 @@ int exec_as_func(int flags, void *ptr)
7e4903
 			/* Create single string with all command line options. */
7e4903
 			int ii = 1;
7e4903
 			char *opt = strdup(":");
7e4903
+            char *tempOpt;
7e4903
 			while (opt != NULL && arg[ii] != NULL) {
7e4903
-				opt = realloc(opt, strlen(opt) + strlen(arg[ii]) + 2);
7e4903
+				tempOpt = realloc(opt, strlen(opt) + strlen(arg[ii]) + 2);
7e4903
+                if (tempOpt != NULL){
7e4903
+                    opt = tempOpt;
7e4903
+                } else {
7e4903
+                    break;
7e4903
+                }
7e4903
 				opt = strcat(opt, " ");
7e4903
 				opt = strcat(opt, arg[ii]);
7e4903
 				ii++;