diff options
| author | Matt Fleming <matt.fleming@intel.com> | 2012-12-07 11:33:45 +0000 |
|---|---|---|
| committer | Matt Fleming <matt.fleming@intel.com> | 2012-12-07 11:33:45 +0000 |
| commit | 10f6cf6eef0a7da7dad1933efdbfb101155792d0 (patch) | |
| tree | d8ee3bfc6e55e739e0f135cd6d945955c670dd46 /com32/lib/bufprintf.c | |
| parent | 35928ee37da523e5f992cc462a4a4193d0bfaa4c (diff) | |
| parent | ddb10ce99c327888ade4d2ba3e4c50ad12aaa059 (diff) | |
| download | syslinux-6.00-pre3.tar.gz | |
Merge tag 'syslinux-5.00' into firmwaresyslinux-6.00-pre3
Conflicts:
Makefile
com32/elflink/ldlinux/Makefile
com32/lib/sys/module/elf_module.c
core/cleanup.c
core/comboot.inc
core/conio.c
core/fs/fs.c
core/init.c
core/mem/free.c
core/mem/malloc.c
core/timer.inc
diag/geodsp/Makefile
extlinux/main.c
mk/embedded.mk
modules/Makefile
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
Diffstat (limited to 'com32/lib/bufprintf.c')
| -rw-r--r-- | com32/lib/bufprintf.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/com32/lib/bufprintf.c b/com32/lib/bufprintf.c index 939bcec3..d2812311 100644 --- a/com32/lib/bufprintf.c +++ b/com32/lib/bufprintf.c @@ -17,8 +17,10 @@ int vbufprintf(struct print_buf *buf, const char *format, va_list ap) char *newbuf; newbuf = realloc(buf->buf, newsize); - if (!newbuf) - return -1; + if (!newbuf) { + rv = -1; + goto bail; + } buf->buf = newbuf; buf->size = newsize; @@ -26,6 +28,8 @@ int vbufprintf(struct print_buf *buf, const char *format, va_list ap) rv = vsnprintf(buf->buf + buf->len, buf->size - buf->len, format, ap2); buf->len += rv; +bail: + va_end(ap2); return rv; } |
