[PATCH master 5/6] memory_display: don't skip va_end in error case

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



There's a va_start at the start of __pr_memory_display, but va_end was
only called in the successful case. Fix this.

Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>
---
 common/memory_display.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/memory_display.c b/common/memory_display.c
index 77868be26ace..c0ca469703d3 100644
--- a/common/memory_display.c
+++ b/common/memory_display.c
@@ -123,9 +123,9 @@ int __pr_memory_display(int level, const void *addr, loff_t offs, unsigned nbyte
 
 	} while (nbytes > 0);
 
-	va_end(args);
 	ret = 0;
 out:
+	va_end(args);
 
 	return ret;
 }
-- 
2.39.2





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux