mount: remove tmp file after use
authorRobert Swiecki <robert@swiecki.net>
Mon, 29 May 2017 02:50:29 +0000 (04:50 +0200)
committerRobert Swiecki <robert@swiecki.net>
Mon, 29 May 2017 02:50:29 +0000 (04:50 +0200)
mount.c

diff --git a/mount.c b/mount.c
index cec987b8e05f3032129f8c959956b22a90aa2e98..1ecd41170813691617c64147bd40e4b8d71dc3df 100644 (file)
--- a/mount.c
+++ b/mount.c
@@ -200,6 +200,10 @@ static bool mountMount(struct mounts_t *mpt, const char *newroot)
                        return false;
                }
        }
+
+       if (mpt->src_content && unlink(srcpath) == -1) {
+               PLOG_W("unlink('%s')", srcpath);
+       }
        return true;
 }