You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by jp...@apache.org on 2015/11/23 23:56:12 UTC

trafficserver git commit: TS-4040: add missing va_end calls

Repository: trafficserver
Updated Branches:
  refs/heads/master 5e45efd21 -> 730bd80dd


TS-4040: add missing va_end calls

Adding the missing `va_end(...)` statements to `Diags.cc` and
`wccp-test-router.cc`. This closes #349.


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/730bd80d
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/730bd80d
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/730bd80d

Branch: refs/heads/master
Commit: 730bd80dd851824ed0d6a2c34c53c78437b59ba1
Parents: 5e45efd
Author: Can Selcik <cs...@linkedin.com>
Authored: Mon Nov 23 12:11:45 2015 -0800
Committer: James Peach <jp...@apache.org>
Committed: Mon Nov 23 14:48:10 2015 -0800

----------------------------------------------------------------------
 lib/ts/Diags.cc              | 5 +++++
 lib/wccp/wccp-test-router.cc | 2 ++
 2 files changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/730bd80d/lib/ts/Diags.cc
----------------------------------------------------------------------
diff --git a/lib/ts/Diags.cc b/lib/ts/Diags.cc
index a43398b..d84cc65 100644
--- a/lib/ts/Diags.cc
+++ b/lib/ts/Diags.cc
@@ -333,6 +333,7 @@ Diags::print_va(const char *debug_tag, DiagsLevel diags_level, const SrcLoc *loc
       va_list tmp;
       va_copy(tmp, ap);
       vprintline(diags_log->m_fp, format_buf_w_ts, tmp);
+      va_end(tmp);
     }
   }
 
@@ -341,6 +342,7 @@ Diags::print_va(const char *debug_tag, DiagsLevel diags_level, const SrcLoc *loc
       va_list tmp;
       va_copy(tmp, ap);
       vprintline(stdout_log->m_fp, format_buf_w_ts, tmp);
+      va_end(tmp);
     }
   }
 
@@ -349,6 +351,7 @@ Diags::print_va(const char *debug_tag, DiagsLevel diags_level, const SrcLoc *loc
       va_list tmp;
       va_copy(tmp, ap);
       vprintline(stderr_log->m_fp, format_buf_w_ts, tmp);
+      va_end(tmp);
     }
   }
 
@@ -577,6 +580,8 @@ Diags::error_va(DiagsLevel level, const char *file, const char *func, const int
     }
     ink_fatal_va(format_string, ap2);
   }
+
+  va_end(ap2);
 }
 
 /*

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/730bd80d/lib/wccp/wccp-test-router.cc
----------------------------------------------------------------------
diff --git a/lib/wccp/wccp-test-router.cc b/lib/wccp/wccp-test-router.cc
index 6fbfe17..b64f866 100644
--- a/lib/wccp/wccp-test-router.cc
+++ b/lib/wccp/wccp-test-router.cc
@@ -50,6 +50,8 @@ Error(char const *fmt, ...)
   va_list args;
   va_start(args, fmt);
   vfprintf(stderr, fmt, args);
+  va_end(args);
+
   Ready = false;
 }