statedb: Ensure we don't leak memory in csync_statedb_query().
statedb: Ensure we don't leak memory in csync_statedb_query().

Found by Coverity.

gco/csync,gco/csync,meeh420/csync,gco/csync,meeh420/csync,meeh420/csync,gco/csync