threads / patch / 30303

patchrevert: add missing va_end

Subject: [PATCH] revert: add missing va_end

## tl;dr

2 messages between Apr 21, 2012 and Apr 22, 2012. Diffs are folded; open one to read it.

replies: 1people: 2as markdown or json

Christian Couder· Apr 21, 2012, 21:15 UTC · lore
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
---
 builtin/revert.c |    1 +
 1 file changed, 1 insertion(+)
Show changes to builtin/revert.c +1 −0
diff --git a/builtin/revert.c b/builtin/revert.c
index e6840f2..e4ed023 100644
--- a/builtin/revert.c
+++ b/builtin/revert.c
@@ -86,6 +86,7 @@ static void verify_opt_mutually_compatible(const char *me, ...)
 				break;
 		}
 	}
+	va_end(ap);
 
 	if (opt1 && opt2)
 		die(_("%s: %s cannot be used with %s"),	me, opt1, opt2);
-- 
1.7.10.rc0.17.g74595
Junio C Hamano· Apr 22, 2012, 05:20 UTC · re: Christian Couder · lore

Re: [PATCH] revert: add missing va_end

Christian Couder <chriscool@tuxfamily.org> writes:
Show 14 quoted lines
> Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
> ---
>  builtin/revert.c |    1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/builtin/revert.c b/builtin/revert.c
> index e6840f2..e4ed023 100644
> --- a/builtin/revert.c
> +++ b/builtin/revert.c
> @@ -86,6 +86,7 @@ static void verify_opt_mutually_compatible(const char *me, ...)
>  				break;
>  		}
>  	}
> +	va_end(ap);
Yeah, the original from v1.7.8-rc0~141^2~2 is obviously wrong.  Thanks.

← back to recent threads