Tree: Depth-First Search - Path Sum II (All Root-to-Leaf Paths)
Examine the following recursive code snippet for Path Sum II. Which line contains a subtle bug that causes incorrect results when multiple paths exist?
```python
def dfs(node, path, current_sum):
if not node:
return
path.append(node.val)
if not node.left and not node.right and current_sum + node.val == targetSum:
res.append(path)
dfs(node.left, path, current_sum + node.val)
dfs(node.right, path, current_sum + node.val)
path.pop()
```
