docs; OOM nitpicking ported from SLE #8

Merged
merged 3 commits into from Dec 19, 2012

Projects

None yet

3 participants

@mvidner
YaST member

No description provided.

@aschnell

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.

@jreidinger
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
http://stackoverflow.com/questions/11645282/do-i-need-to-va-end-when-an-exception-is-thrown
2787659
@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