findleaves: Fix typo for --dir argument

Change-Id: I9b78c304d27dd652ef49f72fa6ad9260e4ce605b
diff --git a/tools/findleaves.py b/tools/findleaves.py
index f152a87..97302e9 100755
--- a/tools/findleaves.py
+++ b/tools/findleaves.py
@@ -103,7 +103,7 @@
       prune.append(p)
     elif arg.startswith("--dir="):
       d = arg[len("--dir="):]
-      if len(p) == 0:
+      if len(d) == 0:
         usage()
       dirlist.append(d)
     else: