From 6ff8027ee1f9d443bc14b5ac2e91ec30d52a2d69 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Tue, 2 Jun 2026 12:59:04 +0100 Subject: [PATCH] sysupdate: Minor fix to a cleanup function on an error path `process_image()` has historically used `umount_and_freep` to clean up the mounted directory locally, but callers to it have used `umount_and_rmdir_and_freep`. No directory is created after any of the error return paths in `process_image()`, so it should probably be using `umount_and_rmdir_and_freep` too. --- src/sysupdate/sysupdate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sysupdate/sysupdate.c b/src/sysupdate/sysupdate.c index 3232ab6e37..a4c68e48cf 100644 --- a/src/sysupdate/sysupdate.c +++ b/src/sysupdate/sysupdate.c @@ -983,7 +983,7 @@ static int process_image( ProcessImageFlags flags) { _cleanup_(loop_device_unrefp) LoopDevice *loop_device = NULL; - _cleanup_(umount_and_freep) char *mounted_dir = NULL; + _cleanup_(umount_and_rmdir_and_freep) char *mounted_dir = NULL; int r; assert(c);