dump_systemstate-service: Fix possible memory leaks 66/294966/1 accepted/tizen/unified/dev/20230726.115826
authorSung-hun Kim <sfoon.kim@samsung.com>
Thu, 29 Jun 2023 06:57:33 +0000 (15:57 +0900)
committerSung-hun Kim <sfoon.kim@samsung.com>
Thu, 29 Jun 2023 06:57:33 +0000 (15:57 +0900)
commit920783b2f604d3118386ca54f7ad5c07ecde29be
tree87c470f8fed8411860bdc7cd157eb4b0afe5882a
parent1b1e49367b5b03d61abf792cf70085e34f862666
dump_systemstate-service: Fix possible memory leaks

The `strdup` call uses `malloc` internally for allocating memory
area. Thus, the result of `strdup` should be freed in the
allocation failed cases.

Change-Id: I01a1f1653cd1ddbac5e89cdfb085e0d273414c6c
Signed-off-by: Sung-hun Kim <sfoon.kim@samsung.com>
src/dump_systemstate-service/dump_systemstate-service.c