Consider a $C^\infty$ smooth nonconvex function $f$, and ODE
$$
\begin{cases}
\dot{x}=-x\circ\nabla f(x),\\
x(0)\in\mathbb{R}^d_{++}.
\end{cases}
$$
Then, can you prove that the solution has finite length under mild condition, e.g. $f$ satisfies the Kurdyka-Łojasiewicz inequality? 

We shold be careful that $x(t)$ can approach the boundary of $\mathbb{R}^d_{++}$. I believe it should be correct, as I have tried many numerical test and cannot find any counterexamples.