Blame SOURCES/which-2.21-coverity-fixes.patch

f96898
diff -up which-2.21/tilde/tilde.c.me which-2.21/tilde/tilde.c
f96898
--- which-2.21/tilde/tilde.c.me	2018-07-23 14:32:47.002225732 +0200
f96898
+++ which-2.21/tilde/tilde.c	2018-07-23 14:49:06.363623898 +0200
f96898
@@ -196,7 +196,8 @@ tilde_expand (string)
f96898
   int result_size, result_index;
f96898
 
f96898
   result_index = result_size = 0;
f96898
-  if (result = strchr (string, '~'))
f96898
+  result = strchr (string, '~');
f96898
+  if (result)
f96898
     result = (char *)xmalloc (result_size = (strlen (string) + 16));
f96898
   else
f96898
     result = (char *)xmalloc (result_size = (strlen (string) + 1));
f96898
diff -up which-2.21/which.c.me which-2.21/which.c
f96898
diff -up which-2.21/which.c.me which-2.21/which.c
f96898
--- which-2.21/which.c.me	2018-07-23 15:09:04.355222509 +0200
f96898
+++ which-2.21/which.c	2018-07-25 14:57:43.696309701 +0200
f96898
@@ -671,6 +671,9 @@ int main(int argc, char *argv[])
f96898
     }
f96898
   }
f96898
 
f96898
+  if (abs_path)
f96898
+    free(abs_path);
f96898
+
f96898
   return fail_count;
f96898
 }
f96898