diff options
author | Colin Walters <walters@verbum.org> | 2016-09-08 10:29:10 -0400 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2016-09-08 14:34:04 +0000 |
commit | 8dbb104cdcfaadad8a826eb76fec5f7058c5beb4 (patch) | |
tree | 93386fd455a47a557b09b1a8e381b124abc2a5d7 /src/libostree/ostree-repo-static-delta-compilation.c | |
parent | 845dc651962b2c106872428336c9d81c2ed12432 (diff) | |
download | ostree-8dbb104cdcfaadad8a826eb76fec5f7058c5beb4.tar.gz |
delta: Add missing `goto out` for failure to mmap()
This was hit in practice when generating a delta for a flatpak app on ARM
it looks like.
Closes: #497
Approved by: alexlarsson
Diffstat (limited to 'src/libostree/ostree-repo-static-delta-compilation.c')
-rw-r--r-- | src/libostree/ostree-repo-static-delta-compilation.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libostree/ostree-repo-static-delta-compilation.c b/src/libostree/ostree-repo-static-delta-compilation.c index 188f467d..15b1df8d 100644 --- a/src/libostree/ostree-repo-static-delta-compilation.c +++ b/src/libostree/ostree-repo-static-delta-compilation.c @@ -483,6 +483,8 @@ get_unpacked_unlinked_content (OstreeRepo *repo, goto out; { GMappedFile *mfile = g_mapped_file_new_from_fd (fd, FALSE, error); + if (!mfile) + goto out; ret_content = g_mapped_file_get_bytes (mfile); g_mapped_file_unref (mfile); } |