shared: make sure image_path_lock() return parameters are always initialized on success

We forgot to initialize the "global" return parameter in one case. Fix that.
This commit is contained in:
Lennart Poettering 2016-11-18 23:31:01 +01:00
parent 0f3be6ca4d
commit 546dbec532

View file

@ -27,6 +27,7 @@
#include <sys/stat.h>
#include <unistd.h>
#include <linux/fs.h>
#include "alloc-util.h"
#include "btrfs-util.h"
#include "chattr-util.h"
@ -37,8 +38,8 @@
#include "hashmap.h"
#include "lockfile-util.h"
#include "log.h"
#include "macro.h"
#include "machine-image.h"
#include "macro.h"
#include "mkdir.h"
#include "path-util.h"
#include "rm-rf.h"
@ -746,7 +747,8 @@ int image_path_lock(const char *path, int operation, LockFile *global, LockFile
release_lock_file(&t);
return r;
}
}
} else
*global = (LockFile) LOCK_FILE_INIT;
*local = t;
return 0;