summaryrefslogtreecommitdiffstats
path: root/src/fiasco.c
diff options
context:
space:
mode:
authorPali Rohár <pali.rohar@gmail.com>2014-11-18 20:14:23 +0100
committerPali Rohár <pali.rohar@gmail.com>2014-11-18 20:14:23 +0100
commit142ef93ddc8fe78c136547f2d127502aacc633e4 (patch)
tree2f153e0332293be8a069312a8aad6276ca446fed /src/fiasco.c
parent89566f559b6fba25de2f3c7a7064417e10ee81aa (diff)
download0xFFFF-142ef93ddc8fe78c136547f2d127502aacc633e4.tar.bz2
fiasco: Fix initializing variables
Diffstat (limited to 'src/fiasco.c')
-rw-r--r--src/fiasco.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/fiasco.c b/src/fiasco.c
index 993b43d..06c8312 100644
--- a/src/fiasco.c
+++ b/src/fiasco.c
@@ -453,9 +453,9 @@ int fiasco_write_to_file(struct fiasco * fiasco, const char * file) {
int fiasco_unpack(struct fiasco * fiasco, const char * dir) {
- int fd = -1;
- char * name = NULL;
- char * layout_name = NULL;
+ int fd;
+ char * name;
+ char * layout_name;
struct image * image;
struct image_list * image_list;
uint32_t size;
@@ -484,6 +484,10 @@ int fiasco_unpack(struct fiasco * fiasco, const char * dir) {
while ( image_list ) {
+ fd = -1;
+ name = NULL;
+ layout_name = NULL;
+
image = image_list->image;
name = image_name_alloc_from_values(image);