Skip to content

Commit 1cd417d

Browse files
juanarboltargos
authored andcommitted
permission: remove useless conditional
Deleting a null pointer has no effect. The check is not needed. Signed-off-by: Juan José Arboleda <soyjuanarbol@gmail.com> PR-URL: #58514 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
1 parent 32efb63 commit 1cd417d

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/permission/fs_permission.cc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,7 @@ void FreeRecursivelyNode(
4545
}
4646
}
4747

48-
if (node->wildcard_child != nullptr) {
49-
delete node->wildcard_child;
50-
}
48+
delete node->wildcard_child;
5149
delete node;
5250
}
5351

0 commit comments

Comments
 (0)