summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-03-06 17:13:33 +0000
committeroharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2008-03-06 17:13:33 +0000
commitd74d72c73a692fbdf222c4cb595a5d015f4611c9 (patch)
treed3a206bb1ac474c5bf3d7307eb80fd2b54c32748 /src
parentff59d1c49516f9a858972ec354391fda5a444891 (diff)
downloadopenocd_libswd-d74d72c73a692fbdf222c4cb595a5d015f4611c9.tar.gz
openocd_libswd-d74d72c73a692fbdf222c4cb595a5d015f4611c9.tar.bz2
openocd_libswd-d74d72c73a692fbdf222c4cb595a5d015f4611c9.tar.xz
openocd_libswd-d74d72c73a692fbdf222c4cb595a5d015f4611c9.zip
Pavel Chromy: va_copy should always be paired with va_end.
git-svn-id: svn://svn.berlios.de/openocd/trunk@459 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src')
-rw-r--r--src/helper/log.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/helper/log.c b/src/helper/log.c
index 3d4f0389..694e8a8b 100644
--- a/src/helper/log.c
+++ b/src/helper/log.c
@@ -288,6 +288,9 @@ char *alloc_printf(const char *fmt, va_list ap)
int ret;
ret = vsnprintf(string, size, fmt, ap_copy);
+
+ va_end(ap_copy);
+
/* NB! The result of the vsnprintf() might be an *EMPTY* string! */
if ((ret >= 0) && ((ret + 1) < size))
break;