[sr-dev] git:master: core: free previous allocated variable if no more pkg to build rve struct