diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | openbsd-compat/bsd-asprintf.c | 1 |
2 files changed, 6 insertions, 1 deletions
@@ -1,3 +1,7 @@ | |||
1 | 20070914 | ||
2 | - (dtucker) [openbsd-compat/bsd-asprintf.c] Plug mem leak in error path. | ||
3 | Patch from Jan.Pechanec at sun com. | ||
4 | |||
1 | 20070910 | 5 | 20070910 |
2 | - (dtucker) [openbsd-compat/regress/closefromtest.c] Bug #1358: Always | 6 | - (dtucker) [openbsd-compat/regress/closefromtest.c] Bug #1358: Always |
3 | return 0 on successful test. From David.Leonard at quest com. | 7 | return 0 on successful test. From David.Leonard at quest com. |
@@ -3190,4 +3194,4 @@ | |||
3190 | OpenServer 6 and add osr5bigcrypt support so when someone migrates | 3194 | OpenServer 6 and add osr5bigcrypt support so when someone migrates |
3191 | passwords between UnixWare and OpenServer they will still work. OK dtucker@ | 3195 | passwords between UnixWare and OpenServer they will still work. OK dtucker@ |
3192 | 3196 | ||
3193 | $Id: ChangeLog,v 1.4741 2007/09/10 23:24:17 tim Exp $ | 3197 | $Id: ChangeLog,v 1.4742 2007/09/14 00:04:15 dtucker Exp $ |
diff --git a/openbsd-compat/bsd-asprintf.c b/openbsd-compat/bsd-asprintf.c index 00fa0dfd8..3368195d4 100644 --- a/openbsd-compat/bsd-asprintf.c +++ b/openbsd-compat/bsd-asprintf.c | |||
@@ -55,6 +55,7 @@ vasprintf(char **str, const char *fmt, va_list ap) | |||
55 | if (ret >= 0 && ret < INIT_SZ) { /* succeeded with initial alloc */ | 55 | if (ret >= 0 && ret < INIT_SZ) { /* succeeded with initial alloc */ |
56 | *str = string; | 56 | *str = string; |
57 | } else if (ret == INT_MAX || ret < 0) { /* Bad length */ | 57 | } else if (ret == INT_MAX || ret < 0) { /* Bad length */ |
58 | free(string); | ||
58 | goto fail; | 59 | goto fail; |
59 | } else { /* bigger than initial, realloc allowing for nul */ | 60 | } else { /* bigger than initial, realloc allowing for nul */ |
60 | len = (size_t)ret + 1; | 61 | len = (size_t)ret + 1; |