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

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