libsystem: strv: avoid memory leak by realloc
authorWaLyong Cho <walyong.cho@samsung.com>
Tue, 8 Nov 2016 10:27:01 +0000 (19:27 +0900)
committerWaLyong Cho <walyong.cho@samsung.com>
Tue, 8 Nov 2016 10:29:57 +0000 (19:29 +0900)
commit53d7f6cf18188ce82c0c24c468bd22cfe517b675
tree160043233a3fa5d51cf70571f93f266495453127
parent4809efe44e7ecee13a1c2b19fb3114621f1e3c12
libsystem: strv: avoid memory leak by realloc

In str_to_strv(), during interation the strings if allocation is failed
after second chance, the allocated origin value v is leaked.
And recent gcc is safe for null free. So destroy value without check.

Change-Id: I7fda4d76484201b2ccb66f5617ca75d0e4ecb1aa
Signed-off-by: WaLyong Cho <walyong.cho@samsung.com>
src/libsystem/libsystem.c