Fix double memory free in db_for_resource

Double free causes due path already has cleanup attribute.
It's gcc specific, but such attribute uses in another places.

Signed-off-by: Alexey Perevalov <a.perevalov@samsung.com>