Scabrero/fix memory leaks

The memory leak is not here, because bpath is allocated on the TALLOC_CTX given as parameter, the problem is where this function is used (that is using NULL as a TALLOC_CTX, problem)