From aac8a6fee15d059345666d4c1f2f02188632cab6 Mon Sep 17 00:00:00 2001 From: Seung-Woo Kim Date: Wed, 9 May 2018 14:27:05 +0900 Subject: [PATCH] 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 --- libthor/thor_tar.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); -- 2.34.1