The following commit has been merged in the master branch: commit 3175c4ac2997441375072eb31744ae167b21edd7 Author: Guillem Jover <[EMAIL PROTECTED]> Date: Tue Jun 10 01:41:59 2008 +0300
libdpkg: Call va_end when done with the va_list variable from va_copy This fixes a memory leak on systems were va_copy needs to allocate memory. diff --git a/ChangeLog b/ChangeLog index 5b6987a..9d59b3c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2008-06-10 Guillem Jover <[EMAIL PROTECTED]> + * lib/varbuf.c (varbufvprintf): Call va_end when done with the va_list + variable from va_copy. + +2008-06-10 Guillem Jover <[EMAIL PROTECTED]> + * lib/varbuf.c (varbufprintf): Use varbufvprintf instead of reimplementing it. diff --git a/lib/varbuf.c b/lib/varbuf.c index 63060c2..ffcc544 100644 --- a/lib/varbuf.c +++ b/lib/varbuf.c @@ -65,6 +65,7 @@ int varbufvprintf(struct varbuf *v, const char *fmt, va_list va) { varbufextend(v); va_copy(al, va); r= vsnprintf(v->buf+ou,v->size-ou,fmt,al); + va_end(al); if (r < 0) r= (v->size-ou+1) * 2; v->used= ou+r; } while (r >= (int)(v->size - ou - 1)); -- dpkg's main repository -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]