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

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