twrpTar: Fix uninitialized current_archive_type
* current_archive_type is not properly initialized
leading to a potential random close(fd) in closeTar()
Change-Id: I1598ba4d524b723b8175ee847e2b1c5aeedbd938
diff --git a/twrpTar.cpp b/twrpTar.cpp
index d86e133..aa00044 100644
--- a/twrpTar.cpp
+++ b/twrpTar.cpp
@@ -1102,6 +1102,7 @@
}
} else {
// Not compressed or encrypted
+ current_archive_type = UNCOMPRESSED;
init_libtar_buffer(0, progress_pipe_fd);
if (part_settings->adbbackup) {
LOGINFO("Opening TW_ADB_BACKUP uncompressed stream\n");