freenetconf/freenetconfd — pull request #2 by KanjiMonster (2014-08-15 14:33:28+00:00)
Title: dmconfig: fix talloc usage if filter is set

Fixes the following issues in talloc usage:
* current_path was never freed
* path might be talloc_free'd even if it was not talloc'd
* argument variable path is reused (bad style)

At least issue 2 causes talloc aborts and consecutive crashes.

Fix this by rewriting the talloc handling in the following way:
* use a centralized exit out
* always free current_path
* don't reuse path and instead use current_path

While at it, fix the leak of v if rpc_db_list() fails.

Signed-off-by: Jonas Gorski