libsepol: destroy the copied va_list
va_copy()'s manpage [1] states: Each invocation of va_copy() must be matched by a corresponding invocation of va_end() in the same function. create_str_helper() is using va_copy() without va_end(). Add the missing call. [1] https://linux.die.net/man/3/va_copy Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
This commit is contained in:
parent
daa00b2899
commit
a761a88aab
1 changed files with 3 additions and 0 deletions
|
@ -80,10 +80,13 @@ static char *create_str_helper(const char *fmt, int num, va_list vargs)
|
|||
goto exit;
|
||||
}
|
||||
|
||||
va_end(vargs2);
|
||||
|
||||
return str;
|
||||
|
||||
exit:
|
||||
free(str);
|
||||
va_end(vargs2);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue