Deallocate memory before setting new value
- Issue:
Memory leak can be possible if vc_cmd_db module sets the new value in
vc_cmd_s structure.
- Solution:
The possibility of the issue is because the module did not check the
preivous value of the member. Thus, this patch adds code for checking
the member of the structure. If there is already value set, the module
will release the old value and then set new value.
Change-Id: I2d2676d08a4cacb75c32983c1a49eced28371b65
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>