diff options
author | Stephen Gallagher <sgallagh@redhat.com> | 2010-06-09 10:45:33 -0400 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2010-06-10 10:17:38 -0400 |
commit | 75b1a17efec759980a636b41e0c8144230725802 (patch) | |
tree | 84802709145ea3a794453951a5fefbbd41c5757b | |
parent | 3ae60b86b6bfcd049d23438855fd7ba9b4f38fab (diff) | |
download | sssd-75b1a17efec759980a636b41e0c8144230725802.tar.gz sssd-75b1a17efec759980a636b41e0c8144230725802.tar.bz2 sssd-75b1a17efec759980a636b41e0c8144230725802.zip |
Make sure to close varargs before returning from a function
https://fedorahosted.org/sssd/ticket/528
-rw-r--r-- | src/krb5_plugin/sssd_krb5_locator_plugin.c | 3 | ||||
-rw-r--r-- | src/tools/selinux.c | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/src/krb5_plugin/sssd_krb5_locator_plugin.c b/src/krb5_plugin/sssd_krb5_locator_plugin.c index 70479efd..a4dc31cb 100644 --- a/src/krb5_plugin/sssd_krb5_locator_plugin.c +++ b/src/krb5_plugin/sssd_krb5_locator_plugin.c @@ -67,13 +67,12 @@ void debug_fn(const char *format, ...) va_start(ap, format); ret = vasprintf(&s, format, ap); + va_end(ap); if (ret < 0) { /* ENOMEM */ return; } - va_end(ap); - fprintf(stderr, DEBUG_KEY "%s", s); free(s); } diff --git a/src/tools/selinux.c b/src/tools/selinux.c index 23951289..27cc5680 100644 --- a/src/tools/selinux.c +++ b/src/tools/selinux.c @@ -116,11 +116,11 @@ static void sss_semanage_error_callback(void *varg, va_start(ap, fmt); ret = vasprintf(&message, fmt, ap); + va_end(ap); if (ret < 0) { /* ENOMEM */ return; } - va_end(ap); if (level <= debug_level) { if (debug_timestamps) { |