diff options
author | Russ Allbery <rra@dropbox.com> | 2016-02-03 12:44:33 -0800 |
---|---|---|
committer | Russ Allbery <rra@dropbox.com> | 2016-02-03 12:44:33 -0800 |
commit | 2a53df4444cb8a931e82c584288025e315f40121 (patch) | |
tree | 7c8b9bfa69cf613a22ba6be616a0d3fdb4146e4e /util/xmalloc.c | |
parent | 294d46a917b6aa3af305c3d50b8d83a1f3fb5694 (diff) | |
parent | e64d4e31146b87046916c377557f8ea789da3f0a (diff) |
Merge branch 'debian/master' into ubuntu/precise
Diffstat (limited to 'util/xmalloc.c')
-rw-r--r-- | util/xmalloc.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/util/xmalloc.c b/util/xmalloc.c index 721447a..7fb0405 100644 --- a/util/xmalloc.c +++ b/util/xmalloc.c @@ -12,7 +12,7 @@ * buffer = xmalloc(1024); * xrealloc(buffer, 2048); * free(buffer); - * buffer = xcalloc(1024); + * buffer = xcalloc(1, 1024); * free(buffer); * buffer = xstrdup(string); * free(buffer); @@ -62,6 +62,7 @@ * The canonical version of this file is maintained in the rra-c-util package, * which can be found at <http://www.eyrie.org/~eagle/software/rra-c-util/>. * + * Copyright 2015 Russ Allbery <eagle@eyrie.org> * Copyright 2012, 2013, 2014 * The Board of Trustees of the Leland Stanford Junior University * Copyright (c) 2004, 2005, 2006 @@ -258,6 +259,7 @@ x_asprintf(char **strp, const char *file, int line, const char *fmt, ...) status = vasprintf(strp, fmt, args_copy); va_end(args_copy); } + va_end(args); } #else /* !(HAVE_C99_VAMACROS || HAVE_GNU_VAMACROS) */ void @@ -280,5 +282,6 @@ x_asprintf(char **strp, const char *fmt, ...) status = vasprintf(strp, fmt, args_copy); va_end(args_copy); } + va_end(args); } #endif /* !(HAVE_C99_VAMACROS || HAVE_GNU_VAMACROS) */ |