summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeung-Woo Kim <sw0312.kim@samsung.com>2018-05-09 14:27:05 +0900
committerSeung-Woo Kim <sw0312.kim@samsung.com>2018-05-18 12:30:19 +0900
commitaac8a6fee15d059345666d4c1f2f02188632cab6 (patch)
tree05e2c633c65d7cc4339586eb9641adf2406553cc
parent9ab5f26254cb3c3f308786892701d3fd8fb79c64 (diff)
downloadlthor-aac8a6fee15d059345666d4c1f2f02188632cab6.tar.gz
lthor-aac8a6fee15d059345666d4c1f2f02188632cab6.tar.bz2
lthor-aac8a6fee15d059345666d4c1f2f02188632cab6.zip
Fix uninitialized data in error ret value
There is uninitialized data issue in static analysis tool result. Fix the uninitialized data in error ret value. Change-Id: I7e5e0f6fa372c125c5ce6eb8df321cb08919b9cf Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
-rw-r--r--libthor/thor_tar.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libthor/thor_tar.c b/libthor/thor_tar.c
index f7bb78b..c0a1fa1 100644
--- a/libthor/thor_tar.c
+++ b/libthor/thor_tar.c
@@ -119,8 +119,10 @@ static int tar_prep_read(const char *path, struct archive **archive,
return -ENOMEM;
ae = archive_entry_new();
- if (!ae)
+ if (!ae) {
+ ret = -ENOMEM;
goto read_finish;
+ }
archive_read_support_format_tar(ar);
archive_read_support_filter_gzip(ar);