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:22 -0400 |
commit | a1445466e298085a4a1f847cf50b6d2f8f007a9a (patch) | |
tree | 1bc9462a09f4d35674ee4518db5bf5f1fbc612d3 | |
parent | ec79ebede424ad301cf128f5c774f8557b0c7f0d (diff) | |
download | sssd-a1445466e298085a4a1f847cf50b6d2f8f007a9a.tar.gz sssd-a1445466e298085a4a1f847cf50b6d2f8f007a9a.tar.xz sssd-a1445466e298085a4a1f847cf50b6d2f8f007a9a.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 70479efdc..a4dc31cb5 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 23951289a..27cc56803 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) { |