From 76bc1bb6bd31915d61009a32e114bcc46eedbfd0 Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Mon, 2 May 2011 12:12:34 +1000 Subject: [PATCH] lafs_load - fix crash on error We should be initialising *err, not just 'err'. Signed-off-by: NeilBrown --- lib/lafs_load.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/lafs_load.c b/lib/lafs_load.c index 726d241..cd832ce 100644 --- a/lib/lafs_load.c +++ b/lib/lafs_load.c @@ -180,7 +180,7 @@ struct lafs_device *lafs_load(int fd, long long device_bytes, char **err) int i; int found; - err = NULL; + *err = NULL; for (addr = 0; addr < device_bytes; addr += 512) { if (addr == 32*512 && device_bytes > 64*512) -- 2.39.5