Upon error 'ffd' was never closed. Found by coverity. Signed-off-by: Hannes Reinecke <hare@xxxxxxxx> --- kpartx/lopart.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kpartx/lopart.c b/kpartx/lopart.c index e7f6090..5495e27 100644 --- a/kpartx/lopart.c +++ b/kpartx/lopart.c @@ -252,6 +252,7 @@ set_loop (const char *device, const char *file, int offset, int *loopro) } if ((fd = open (device, mode)) < 0) { + close(ffd); perror (device); return 1; } -- 2.6.6 -- dm-devel mailing list dm-devel@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/dm-devel