The search space of the path planning problem can greatly affect the running time and memory consumption, for example, the concave obstacle in grid-based map usually leads to the invalid search space. In this paper, the filling container algorithm is proposed to alleviate the concave area problem in 2D map space, which is inspired from the scenario of pouring water into a cup. With this method, concave areas can be largely excluded by scanning the map repeatedly. And the effectiveness has been proved in our experiments.