docs; OOM nitpicking ported from SLE #8

merged 3 commits into from Dec 19, 2012


None yet

3 participants

YaST member

No description provided.


va_end is not called when the whole function throws.

YaST member

Hm, right. In this specific case it should not matter since the intent of the exception is to terminate the program anyway. But the correct way is to move the va_end right after vasprintf where ap is last used. Will do.

YaST member

LGTM for me, feel free to merge it when fixed va_end arvin mention

@mvidner mvidner call va_end *before* potentially throwing an exception
spotted by aschnell

C99: "Each invocation of the va_start and va_copy macros shall be
matched by a corresponding invocation of the va_end macro in the
samed function." (7.15.1), quoted in
@mvidner mvidner merged commit 7e7f977 into yast:master Dec 19, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment