[sr-dev] git:master: db_flatstore: free result before returning null on no more pkg